mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-09 03:04:20 -04:00
Redirect to / when setup is done in ssr mode
This commit is contained in:
parent
a9a74ddc14
commit
e015882834
@ -266,6 +266,11 @@ App.getInitialProps = async (ctx: AppContext) => {
|
||||
ctx.ctx.res!.end();
|
||||
return {} as any;
|
||||
}
|
||||
if (info!.setupStatus === SetupStep.Done && ctx.router.route === "/setup") {
|
||||
ctx.ctx.res!.writeHead(307, { Location: "/" });
|
||||
ctx.ctx.res!.end();
|
||||
return {} as any;
|
||||
}
|
||||
} catch (e) {
|
||||
console.error("SSR error, disabling it.");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user