mirror of
https://github.com/chubin/wttr.in
synced 2025-01-12 03:58:45 +00:00
Don't redirect if TLS is already in use
This commit is contained in:
parent
b2b918637e
commit
ff4f258f2d
1 changed files with 1 additions and 1 deletions
|
@ -145,7 +145,7 @@ func redirectInsecure(req *http.Request) (*responseWithHeader, bool) {
|
|||
return nil, false
|
||||
}
|
||||
|
||||
if strings.ToLower(req.Header.Get("X-Forwarded-Proto")) == "https" {
|
||||
if req.TLS != nil || strings.ToLower(req.Header.Get("X-Forwarded-Proto")) == "https" {
|
||||
return nil, false
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue