diff --git a/main.go b/main.go index 36a6f81..d799b38 100644 --- a/main.go +++ b/main.go @@ -137,12 +137,13 @@ func main() { // Global HTTP headers server.Use(func(c *fiber.Ctx) error { - c.Set("X-Frame-Options", "SAMEORIGIN") + c.Set("X-Frame-Options", "DENY") + // use this if need iframe: `X-Frame-Options: SAMEORIGIN` c.Set("X-Content-Type-Options", "nosniff") c.Set("Referrer-Policy", "no-referrer") c.Set("Strict-Transport-Security", "max-age=31536000; includeSubDomains; preload") c.Set("Content-Security-Policy", fmt.Sprintf("default-src 'none'; script-src 'self'; style-src 'self'; img-src 'self' %s; connect-src 'self'; form-action 'self'; frame-ancestors 'none'; ", config.GetImageProxyOrigin(c))) - // use this if need iframe: frame-ancestors 'self' + // use this if need iframe: `frame-ancestors 'self'` return c.Next() })