fix regex
This commit is contained in:
@@ -34,9 +34,7 @@ app.use(express.static(path.join(__dirname, 'frontend')));
|
|||||||
|
|
||||||
app.use(express.static(`${__dirname}/./frontend`));
|
app.use(express.static(`${__dirname}/./frontend`));
|
||||||
app.all("/*", function (req, res, next) {
|
app.all("/*", function (req, res, next) {
|
||||||
if (!/simcompanies\/API\/.*/.test(req.url)) {
|
if (!/^\/\/API\/.*/.test(req.url)) {
|
||||||
console.log(req.url);
|
|
||||||
console.log(/\/simcompanies\/API\/.*/.test(req.url))
|
|
||||||
return res.sendFile(path.join(__dirname, 'frontend', 'index.html'));
|
return res.sendFile(path.join(__dirname, 'frontend', 'index.html'));
|
||||||
} else return next();
|
} else return next();
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user