Skip to content

Commit 4d7a674

Browse files
committed
fix getDomainUrl to determine protocol via header
1 parent 73fb9e7 commit 4d7a674

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/utils/misc.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export function getDomainUrl(request: Request) {
6767
request.headers.get('X-Forwarded-Host') ??
6868
request.headers.get('host') ??
6969
new URL(request.url).host
70-
const protocol = host.includes('localhost') ? 'http' : 'https'
70+
const protocol = request.headers.get('X-Forwarded-Proto') ?? 'http'
7171
return `${protocol}://${host}`
7272
}
7373

0 commit comments

Comments
 (0)