vibes
This commit is contained in:
@@ -82,6 +82,10 @@ func secure(h http.Handler) http.Handler {
|
||||
hd.Set("Content-Security-Policy", "default-src 'self'; img-src 'self' data:; object-src 'none'; base-uri 'none'; frame-ancestors 'none'")
|
||||
hd.Set("X-Content-Type-Options", "nosniff")
|
||||
hd.Set("Referrer-Policy", "no-referrer")
|
||||
if strings.HasPrefix(r.URL.Path, "/admin") {
|
||||
hd.Set("X-Robots-Tag", "noindex, nofollow")
|
||||
hd.Set("Cache-Control", "no-store")
|
||||
}
|
||||
h.ServeHTTP(w, r)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user