Skip to content

Commit 163f512

Browse files
authored
Handle extra slash in middleware endpoints #347
ref DEV-2553
2 parents 286652c + 5bd6398 commit 163f512

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/authgear-web/src/latte/latte.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ class Latte {
1414
public middlewareEndpoint: string;
1515

1616
private get tokenizeEndpoint(): string {
17-
return `${this.middlewareEndpoint}/token`;
17+
return new URL('/token', this.middlewareEndpoint).toString();
1818
}
19+
1920
private get proofOfPhoneNumberVerificationEndpoint(): string {
20-
return `${this.middlewareEndpoint}/proof_of_phone_number_verification
21-
`;
21+
return new URL('/proof_of_phone_number_verification', this.middlewareEndpoint).toString();
2222
}
2323

2424
private flows: LatteFlows;

0 commit comments

Comments
 (0)