From 2e390596eac3fff2aacabe8244d66ff06cf89da0 Mon Sep 17 00:00:00 2001 From: Marco Beretta <81851188+Berry-13@users.noreply.github.com> Date: Wed, 6 Dec 2023 20:08:15 +0100 Subject: [PATCH] return 404 instead of 200 (#1294) --- api/server/index.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/api/server/index.js b/api/server/index.js index 52500cd967..1120dfe6dc 100644 --- a/api/server/index.js +++ b/api/server/index.js @@ -71,9 +71,8 @@ const startServer = async () => { app.use('/api/assistants', routes.assistants); app.use('/api/files', routes.files); - // Static files - app.get('/*', function (req, res) { - res.sendFile(path.join(projectPath, 'dist', 'index.html')); + app.use((req, res) => { + res.status(404).sendFile(path.join(projectPath, 'dist', 'index.html')); }); app.listen(port, host, () => {