fix: correct status code for 404

This commit is contained in:
Vjacheslav Trushkin 2022-11-15 21:53:52 +02:00
parent a701024701
commit ca66ceebaf
1 changed files with 1 additions and 2 deletions

View File

@ -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++) {