Skip to content

Commit

Permalink
Fix scheme identification
Browse files Browse the repository at this point in the history
  • Loading branch information
sharat87 committed Dec 3, 2023
1 parent 7af403c commit 95f5292
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion exchange/exchange.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ func (ex Exchange) FindScheme() string {
return forwardedProto
}

if os.Getenv("HTTPBUN_SSL_CERT") != "" || ex.HeaderValueLast("X-Httpbun-Forwarded-Proto") == "https" {
// todo: this should use the current server's spec, not the global env var to decide if TLS is enabled
if os.Getenv("HTTPBUN_TLS_CERT") != "" {
return "https"
}

Expand Down

0 comments on commit 95f5292

Please sign in to comment.