From ca66ceebaf844fd765cd26450bbd68a74803ad22 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Tue, 15 Nov 2022 21:53:52 +0200 Subject: [PATCH] fix: correct status code for 404 --- src/http/index.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/http/index.ts b/src/http/index.ts index 41d7498..1531e32 100644 --- a/src/http/index.ts +++ b/src/http/index.ts @@ -192,9 +192,8 @@ export async function startHTTPServer() { // Error handling server.setDefaultRoute((req, res) => { - res.statusCode = 301; + res.statusCode = 404; console.log('404:', req.url); - // res.setHeader('Location', appConfig.redirectIndex); // Need to set custom headers because hooks don't work here for (let i = 0; i < headers.length; i++) {