mirror of
https://github.com/zoriya/Kyoo.git
synced 2026-06-03 12:06:41 +00:00
Redirect to / when setup is done in ssr mode
This commit is contained in:
@@ -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.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user