Skip to content

Commit

Permalink
fix: router
Browse files Browse the repository at this point in the history
  • Loading branch information
DevNono committed May 15, 2024
1 parent f459912 commit 3f29d95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/src/webRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const webRouter = Router();
webRouter.use(async (request: Request, response: Response, next: NextFunction) => {
// route /down
const chestAlive = Date.now() - getLastTimeChestWasAlive() < Number.parseInt(process.env.TIME_BEFORE_CHEST_DEATH) * 1000;
if (!request.url.startsWith('/down') && !chestAlive) {
if (!request.url.startsWith('/api') && !request.url.startsWith('/down') && !chestAlive) {
return response.redirect('/down');
}
if (request.url.startsWith('/down') && chestAlive) {
Expand Down

0 comments on commit 3f29d95

Please sign in to comment.