1
0
Fork 0
forked from svrjs/svrjs

Fix server crashes with .dirimages

This commit is contained in:
Dorian Niemiec 2024-04-13 11:13:57 +02:00
parent ebf996856e
commit 50be3cb450

2
svr.js
View file

@ -3528,7 +3528,7 @@ if (!cluster.isPrimary) {
}
// Check if index file exists
if (req.url == "/" || stats.isDirectory()) {
if (!dirImagesMissing && (req.url == "/" || stats.isDirectory())) {
fs.stat((readFrom + "/index.html").replace(/\/+/g, "/"), function (e, s) {
if (e || !s.isFile()) {
fs.stat((readFrom + "/index.htm").replace(/\/+/g, "/"), function (e, s) {