fix local index.html not loading on /

This commit is contained in:
Hri7566 2023-01-14 04:05:00 -05:00
parent 58a22828f4
commit ce286fef1a
1 changed files with 1 additions and 1 deletions

View File

@ -55,7 +55,7 @@ if (config.hostDevFiles) {
app.get('*', (req, res, next) => {
let file = path.join(dir, req.path);
if (fs.existsSync(file)) {
if (fs.existsSync(file) && !file.endsWith('/') && !file.endsWith('\\')) {
res.sendFile(file);
} else {
res.sendFile(path.join(dir, 'index.html'));