Add HSTS header
This commit is contained in:
parent
d225323628
commit
802dd65edf
1 changed files with 3 additions and 2 deletions
1
main.go
1
main.go
|
@ -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.")
|
||||
|
|
Loading…
Reference in a new issue