1
0
Fork 0
forked from svrjs/svrjs

Removed undocumented and non-working code.

This commit is contained in:
Dorian Niemiec 2023-09-12 19:34:34 +02:00
parent e84bb426a7
commit 75e987dcf4
2 changed files with 23 additions and 27 deletions

View file

@ -3,7 +3,7 @@
"port": 80, "port": 80,
"pubport": 80, "pubport": 80,
"page404": "404.html", "page404": "404.html",
"timestamp": 1694539217054, "timestamp": 1694539313104,
"blacklist": [], "blacklist": [],
"nonStandardCodes": [], "nonStandardCodes": [],
"enableCompression": true, "enableCompression": true,

4
svr.js
View file

@ -3396,8 +3396,6 @@ if (!cluster.isPrimary) {
// Check if index file exists // Check if index file exists
if (req.url == "/" || stats.isDirectory()) { if (req.url == "/" || stats.isDirectory()) {
fs.stat(readFrom + "/.notindex".replace(/\/+/g, "/"), function (e) {
if (e) {
fs.stat((readFrom + "/index.html").replace(/\/+/g, "/"), function (e, s) { fs.stat((readFrom + "/index.html").replace(/\/+/g, "/"), function (e, s) {
if (e || !s.isFile()) { if (e || !s.isFile()) {
fs.stat((readFrom + "/index.htm").replace(/\/+/g, "/"), function (e, s) { fs.stat((readFrom + "/index.htm").replace(/\/+/g, "/"), function (e, s) {
@ -3429,8 +3427,6 @@ if (!cluster.isPrimary) {
properDirectoryListingServe(); properDirectoryListingServe();
} }
}); });
}
});
} else { } else {
properDirectoryListingServe(); properDirectoryListingServe();
} }