X-Forwarded-Proto

This commit is contained in:
bel
2024-12-21 13:48:57 -07:00
parent 5ab41100fb
commit 4211b238c5
3 changed files with 9 additions and 196 deletions

View File

@@ -148,6 +148,10 @@ func (s *Server) Pre(foo http.HandlerFunc) http.HandlerFunc {
return
}
if r.URL.Scheme == "https" {
w.Header().Set("X-Forwarded-Proto", "https")
}
w, did := doCORS(w, r)
if did {
pushMeta(r, "explain", "did cors")