Add HSTS header

This commit is contained in:
Fijxu 2024-12-11 13:53:06 -03:00
parent d225323628
commit 802dd65edf
Signed by: Fijxu
GPG key ID: 32C1DDF333EDA6A4

View file

@ -336,6 +336,7 @@ func beforeProxy(next http.HandlerFunc) http.HandlerFunc {
w.Header().Set("Access-Control-Allow-Headers", "*")
w.Header().Set("Access-Control-Allow-Methods", "GET, HEAD, OPTIONS")
w.Header().Set("Access-Control-Max-Age", "1728000")
w.Header().Set("Strict-Transport-Security", "max-age=86400")
// } else {
// w.WriteHeader(401)
// io.WriteString(w, "Only requests coming from inv.nadeko.net are allowed.")