Skip to content

Commit dfa7505

Browse files
fix: x-forwarded-proto is sanitized now (#61)
Co-authored-by: Marcus Weiner <[email protected]>
1 parent 2f418b7 commit dfa7505

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export function createIPXHandler ({
3030
}
3131
const handler: Handler = async (event, _context) => {
3232
const host = event.headers.host
33-
const protocol = event.headers['x-forwarded-proto'] || 'http'
33+
const protocol = event.headers['x-forwarded-proto'] === 'https' ? 'https' : 'http'
3434
let domains = (opts as IPXOptions).domains || []
3535
const remoteURLPatterns = remotePatterns || []
3636
const requestEtag = event.headers['if-none-match']

0 commit comments

Comments
 (0)