bskyweb: configure basic CSP

This commit is contained in:
David Buchanan
2025-11-05 17:06:48 +00:00
parent 531ff6c433
commit 2efc031cd2
+2 -3
View File
@@ -138,9 +138,8 @@ func serve(cctx *cli.Context) error {
ContentTypeNosniff: "nosniff", ContentTypeNosniff: "nosniff",
XFrameOptions: "SAMEORIGIN", XFrameOptions: "SAMEORIGIN",
HSTSMaxAge: 31536000, // 365 days HSTSMaxAge: 31536000, // 365 days
// TODO: ContentSecurityPolicy: fmt.Sprintf("default-src * 'unsafe-inline' blob:; script-src 'self' %s", staticCDNHost),
// ContentSecurityPolicy // Note: XSSProtection not configured because it is deprecated, superseded by CSP
// XSSProtection
})) }))
e.Use(middleware.LoggerWithConfig(middleware.LoggerConfig{ e.Use(middleware.LoggerWithConfig(middleware.LoggerConfig{
// Don't log requests for static content. // Don't log requests for static content.