Skip to content

Commit 4626cc1

Browse files
authored
fix(remix): fix the https replacement (#945)
fixed #916
1 parent d2a1f3c commit 4626cc1

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/heavy-bananas-invite.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@logto/remix": patch
3+
---
4+
5+
fix URL protocol replacement in HandleSignInCallbackController to prevent 'httpss' URLs

packages/remix/src/useCases/handleSignInCallback/HandleSignInCallbackController.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export class HandleSignInCallbackController {
4242
const isForwardedHttpsTraffic = request.headers.get('x-forwarded-proto') === 'https';
4343

4444
const callbackUri = isForwardedHttpsTraffic
45-
? request.url.replace('http', 'https')
45+
? request.url.replace('http://', 'https://')
4646
: request.url;
4747

4848
const result = await this.useCase({

0 commit comments

Comments
 (0)