This commit is contained in:
root
2026-10-01 22:16:48 +02:00
parent b6d1909d7f
commit 9dfdf79fa7
39 changed files with 4560 additions and 181 deletions
+4
View File
@@ -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)
})
}