Skip to content

Commit

Permalink
fix x-forwarded-proto usage
Browse files Browse the repository at this point in the history
  • Loading branch information
nfriedly committed Dec 20, 2023
1 parent 2f76f10 commit 3a06dfd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/unblocker.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,9 @@ function Unblocker(config) {
// default to express's more advanced version of this when available (handles X-Forwarded-Protocol headers)
const proto =
request.protocol ||
request.headers["X-Forwarded-Protocol"] ||
request.headers["x-forwarded-protocol"] ||
request.headers["x-forwarded-proto"] ||
request.headers["x-forwarded-scheme"] ||
(request.connection.encrypted ? "https" : "http");
return proto + "://" + thisHost(request) + config.prefix;
}
Expand Down

0 comments on commit 3a06dfd

Please sign in to comment.