fix redirection to 404 page on login (#2086)
Co-authored-by: Peer Richelsen <[email protected]>
This commit is contained in:
1 parent
0f27385c17
commit
89f86e2c84
1 file changed
+6
-2
@@ -58,8 +58,12 @@ export default function Login({
|
|||||||
|
|
||||||
const telemetry = useTelemetry();
|
const telemetry = useTelemetry();
|
||||||
|
|
||||||
const callbackUrl =
|
let callbackUrl = typeof router.query?.callbackUrl === "string" ? router.query.callbackUrl : "/";
|
||||||
typeof router.query?.callbackUrl === "string" ? `${WEBSITE_URL}/${router.query.callbackUrl}` : "/";
|
|
||||||
|
// If not absolute URL, make it absolute
|
||||||
|
if (!/^https?:\/\//.test(callbackUrl)) {
|
||||||
|
callbackUrl = `${WEBSITE_URL}/${callbackUrl}`;
|
||||||
|
}
|
||||||
|
|
||||||
const LoginFooter = (
|
const LoginFooter = (
|
||||||
<span>
|
<span>
|
||||||
|
|||||||
Reference in new issue
Block a user