Moving secure again, this time to github.com/gin-contrib/secure

This commit is contained in:
2022-05-07 15:56:21 +02:00
parent 3df794ecc4
commit b61d64a755
3 changed files with 13 additions and 5 deletions

View File

@ -13,7 +13,7 @@ import (
"github.com/dcarrillo/whatismyip/internal/httputils"
"github.com/dcarrillo/whatismyip/internal/setting"
"github.com/gin-gonic/contrib/secure"
"github.com/gin-contrib/secure"
"github.com/dcarrillo/whatismyip/models"
"github.com/dcarrillo/whatismyip/router"
@ -141,7 +141,7 @@ func setupEngine() {
engine.Use(gin.LoggerWithFormatter(httputils.GetLogFormatter))
engine.Use(gin.Recovery())
if setting.App.EnableSecureHeaders {
engine.Use(secure.Secure(secure.Options{
engine.Use(secure.New(secure.Config{
BrowserXssFilter: true,
ContentTypeNosniff: true,
FrameDeny: true,