sabisan/internal/app/middleware.go
V fac53d7b85
All checks were successful
Publish / Test, build, and push image (push) Successful in 3m38s
Refactor app and store layout
2026-05-17 00:03:50 +01:00

12 lines
313 B
Go

package app
import "net/http"
func securityHeaders(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("X-Content-Type-Options", "nosniff")
w.Header().Set("Referrer-Policy", "strict-origin-when-cross-origin")
next.ServeHTTP(w, r)
})
}