return 404 instead of 200 (#1294)

This commit is contained in:
Marco Beretta
2023-12-06 20:08:15 +01:00
committed by GitHub
parent ca64efec1b
commit 2e390596ea

View File

@@ -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, () => {