diff --git a/config.json b/config.json index 51da81b..40f4266 100644 --- a/config.json +++ b/config.json @@ -3,7 +3,7 @@ "port": 80, "pubport": 80, "page404": "404.html", - "timestamp": 1694539313104, + "timestamp": 1694540087592, "blacklist": [], "nonStandardCodes": [], "enableCompression": true, diff --git a/svr.js b/svr.js index 57861e0..5f51a02 100644 --- a/svr.js +++ b/svr.js @@ -3402,13 +3402,13 @@ if (!cluster.isPrimary) { if (e || !s.isFile()) { fs.stat((readFrom + "/index.xhtml").replace(/\/+/g, "/"), function (e, s) { if (e || !s.isFile()) { - properDirectoryListingServe(); + properDirectoryListingAndStaticFileServe(); } else { stats = s; pth = (pth + "/index.xhtml").replace(/\/+/g, "/"); ext = "xhtml"; readFrom = "./" + pth; - properDirectoryListingServe(); + properDirectoryListingAndStaticFileServe(); } }); } else { @@ -3416,7 +3416,7 @@ if (!cluster.isPrimary) { pth = (pth + "/index.htm").replace(/\/+/g, "/"); ext = "htm"; readFrom = "./" + pth; - properDirectoryListingServe(); + properDirectoryListingAndStaticFileServe(); } }); } else { @@ -3424,14 +3424,14 @@ if (!cluster.isPrimary) { pth = (pth + "/index.html").replace(/\/+/g, "/"); ext = "html"; readFrom = "./" + pth; - properDirectoryListingServe(); + properDirectoryListingAndStaticFileServe(); } }); } else { - properDirectoryListingServe(); + properDirectoryListingAndStaticFileServe(); } - function properDirectoryListingServe() { + function properDirectoryListingAndStaticFileServe() { if (stats.isDirectory()) { // Check if directory listing is enabled in the configuration if (checkForEnabledDirectoryListing(req.headers.host)) {