diff options
| author | Ahmed AbdelHalim <[email protected]> | 2025-09-13 16:54:59 +0200 |
|---|---|---|
| committer | Ahmed AbdelHalim <[email protected]> | 2025-09-13 16:54:59 +0200 |
| commit | ed854ec905a58650a60b5bdddd857986ec08784a (patch) | |
| tree | 9cc3a9be5b32e0463ff3c97e9325b0fa11b2868d /main.go | |
| parent | 0e89ae072d94650d382707c3cf7a1c5b38ba35f8 (diff) | |
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -223,7 +223,10 @@ func (s *Server) handleLogin(w http.ResponseWriter, r *http.Request) { func (s *Server) showLoginForm(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "text/html; charset=utf-8") - isHTTPS := r.TLS != nil + isHTTPS := r.TLS != nil || + r.Header.Get("X-Forwarded-Proto") == "https" || + r.Header.Get("X-Forwarded-Ssl") == "on" || + r.Header.Get("X-Url-Scheme") == "https" templateData := map[string]any{ "Error": "", "IsHTTPS": isHTTPS, |
