mirror of
https://github.com/barthuijgen/factorio-sites.git
synced 2024-11-21 18:16:33 +02:00
Add redirect to factorio.tools
This commit is contained in:
parent
6668ee727e
commit
db60aac066
@ -111,6 +111,11 @@ const BlueprintsApp = ({
|
||||
};
|
||||
|
||||
BlueprintsApp.getInitialProps = ({ ctx }: AppContext) => {
|
||||
if (ctx.req?.headers?.host === "factorioblueprints.tech" && ctx.res) {
|
||||
ctx.res.statusCode = 302;
|
||||
ctx.res.setHeader("Location", "https://factorio.tools" + ctx.req?.url);
|
||||
}
|
||||
|
||||
const userToken = getSessionToken(ctx.req);
|
||||
return { authenticated: !!userToken };
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user