From 6ecff4756de67d515a6c5ce12b15642ebf71f738 Mon Sep 17 00:00:00 2001 From: MotorTruck1221 Date: Mon, 5 May 2025 00:53:29 -0600 Subject: [PATCH] Come on fastify really? I had to ADD THAT?? --- server/index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/index.ts b/server/index.ts index c5f354e..ca58c6d 100644 --- a/server/index.ts +++ b/server/index.ts @@ -44,6 +44,10 @@ await app.register(fastifyMiddie); await app.use(astroHandler); +app.setNotFoundHandler((req, res) => { + res.redirect('/404'); // This is hacky as hell +}); + const port = parseInt(process.env.PORT as string) || parseInt("8080"); app.listen({ port: port, host: "0.0.0.0" }).then(async () => {