Skip to content

Commit c68ab7d

Browse files
authored
fix: support X-Forwarded-Host with CODER_REDIRECT_TO_ACCESS_URL (coder#7035)
Fixes coder#7026.
1 parent aa660e0 commit c68ab7d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cli/server.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1729,6 +1729,11 @@ func redirectToAccessURL(handler http.Handler, accessURL *url.URL, tunnel bool,
17291729
return
17301730
}
17311731

1732+
if r.Header.Get("X-Forwarded-Host") == accessURL.Host {
1733+
handler.ServeHTTP(w, r)
1734+
return
1735+
}
1736+
17321737
if appHostnameRegex != nil && appHostnameRegex.MatchString(r.Host) {
17331738
handler.ServeHTTP(w, r)
17341739
return

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy