fix redirection to 404 page on login (#2086)
Co-authored-by: Peer Richelsen <peeroke@gmail.com>pull/2084/head^2
parent
0f27385c17
commit
89f86e2c84
|
@ -58,8 +58,12 @@ export default function Login({
|
|||
|
||||
const telemetry = useTelemetry();
|
||||
|
||||
const callbackUrl =
|
||||
typeof router.query?.callbackUrl === "string" ? `${WEBSITE_URL}/${router.query.callbackUrl}` : "/";
|
||||
let callbackUrl = typeof router.query?.callbackUrl === "string" ? router.query.callbackUrl : "/";
|
||||
|
||||
// If not absolute URL, make it absolute
|
||||
if (!/^https?:\/\//.test(callbackUrl)) {
|
||||
callbackUrl = `${WEBSITE_URL}/${callbackUrl}`;
|
||||
}
|
||||
|
||||
const LoginFooter = (
|
||||
<span>
|
||||
|
|
Loading…
Reference in New Issue