make regex work

This commit is contained in:
2020-04-18 03:23:42 +02:00
parent 8feb362f4c
commit d0157f67b3

View File

@@ -34,7 +34,7 @@ app.use(express.static(path.join(__dirname, 'frontend')));
app.use(express.static(`${__dirname}/./frontend`));
app.all("/*", function (req, res, next) {
if (!/^\/simcompanies\/API\/.*/.test(req.url)) {
if (!/\/simcompanies\/API\/.*/.test(req.url)) {
return res.sendFile(path.join(__dirname, 'frontend', 'index.html'));
} else return next();
})