Skip to content

Commit

Permalink
fix: use incoming TLS to detect originalScheme (#705)
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr authored Jul 18, 2023
1 parent adf235e commit 4c979b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion proxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func rewriter(o *options) func(*httputil.ProxyRequest) {

if forwardedProto := r.In.Header.Get("X-Forwarded-Proto"); forwardedProto != "" {
c.originalScheme = forwardedProto
} else if r.Out.TLS == nil {
} else if r.In.TLS == nil {
c.originalScheme = "http"
} else {
c.originalScheme = "https"
Expand Down

0 comments on commit 4c979b6

Please sign in to comment.