Skip to content

Commit 5361b0a

Browse files
authored
Set X-Forwarded headers
1 parent 00e4c85 commit 5361b0a

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

main.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,11 @@ func main() {
117117
return
118118
}
119119

120+
r.Header.Set("X-Forwarded-Host", r.Host)
121+
if r.Header.Get("X-Forwarded-Proto") == "" {
122+
r.Header.Set("X-Forwarded-Proto", "https")
123+
}
124+
120125
p.SetRequestHeaders(r)
121126
p.SetHost()
122127
p.ServeHTTP(w, r)

0 commit comments

Comments
 (0)