web/flows: fix RedirectStage not detecting absolute URLs correctly (#5781)
* web: getURL() method in RedirectStage.ts now actually detects URLs (#5732) Signed-off-by: Saeverix <1863379+Saeverix@users.noreply.github.com> * use native API to build full URL Signed-off-by: Jens Langhammer <jens@goauthentik.io> --------- Signed-off-by: Saeverix <1863379+Saeverix@users.noreply.github.com> Signed-off-by: Jens Langhammer <jens@goauthentik.io> Co-authored-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
parent
4a41811465
commit
47a916ad5e
|
@ -39,10 +39,7 @@ export class RedirectStage extends BaseStage<RedirectChallenge, FlowChallengeRes
|
||||||
}
|
}
|
||||||
|
|
||||||
getURL(): string {
|
getURL(): string {
|
||||||
if (!this.challenge.to.includes("://")) {
|
return new URL(this.challenge.to, document.baseURI).toString();
|
||||||
return window.location.origin + this.challenge.to;
|
|
||||||
}
|
|
||||||
return this.challenge.to;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
firstUpdated(): void {
|
firstUpdated(): void {
|
||||||
|
|
Reference in a new issue