diff --git a/main.go b/main.go index 9dde470..4b99727 100644 --- a/main.go +++ b/main.go @@ -13,6 +13,7 @@ import ( "strings" "time" + "github.com/gin-contrib/secure" "github.com/gin-gonic/contrib/static" "github.com/gin-gonic/gin" _ "github.com/heroku/x/hmetrics/onload" @@ -205,18 +206,18 @@ func ListHandler(c *gin.Context) { func main() { port := ":" + os.Getenv("PORT") router := gin.Default() - /* - router.Use(secure.New(secure.Config{ - SSLRedirect: true, - SSLHost: "np.pogge.rs", - STSSeconds: 315360000, - STSIncludeSubdomains: false, - FrameDeny: true, - ContentTypeNosniff: true, - BrowserXssFilter: true, - SSLProxyHeaders: map[string]string{"X-Forwarded-Proto": "https"}, - })) - */ + + router.Use(secure.New(secure.Config{ + SSLRedirect: true, + SSLHost: "np.pogge.rs", + STSSeconds: 315360000, + STSIncludeSubdomains: false, + FrameDeny: true, + ContentTypeNosniff: true, + BrowserXssFilter: true, + SSLProxyHeaders: map[string]string{"X-Forwarded-Proto": "https"}, + })) + // Serve frontend static files router.Use(static.Serve("/", static.LocalFile("./public", true))) diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..f45d8f1 --- /dev/null +++ b/renovate.json @@ -0,0 +1,5 @@ +{ + "extends": [ + "config:base" + ] +}