This commit is contained in:
11
main.go
11
main.go
@@ -175,13 +175,6 @@ func main() {
|
||||
// Recovery middleware recovers from any panics and writes a 500 if there was one.
|
||||
router.Use(gin.Recovery())
|
||||
|
||||
/*
|
||||
// TODO - think of a better default landing page
|
||||
router.GET("/", func(c *gin.Context) {
|
||||
c.String(http.StatusOK, fmt.Sprintf("SMT Built on %s from sha1 %s\n", buildTime, sha1ver))
|
||||
})
|
||||
*/
|
||||
|
||||
// Set some options for TLS
|
||||
tlsConfig := &tls.Config{
|
||||
MinVersion: tls.VersionTLS12,
|
||||
@@ -238,10 +231,6 @@ func main() {
|
||||
TLSConfig: tlsConfig,
|
||||
}
|
||||
|
||||
// Set the default readme page
|
||||
//router.Use(EmbedReact("/", "static_files", staticDir))
|
||||
//router.Use(static.Serve("/", static.LocalFile("./static_files", true)))
|
||||
|
||||
// Serve the embedded HTML file if no other routes match
|
||||
router.NoRoute(staticFileServer(staticContent))
|
||||
|
||||
|
Reference in New Issue
Block a user