License: MIT
diff --git a/svr.js b/svr.js
index f45eb21..b8adcf8 100644
--- a/svr.js
+++ b/svr.js
@@ -81,7 +81,7 @@ function deleteFolderRecursive(path) {
}
var os = require("os");
-var version = "3.9.2";
+var version = "3.9.3";
var singlethreaded = false;
if (process.versions) process.versions.svrjs = version; // Inject SVR.JS into process.versions
@@ -3274,9 +3274,19 @@ if (!cluster.isPrimary) {
function modExecute(mods, ffinals) {
// Prepare modFunction
var modFunction = ffinals;
- for (var i = mods.length - 1; i >= 0; i--) {
- modFunction = mods[i].callback(req, res, serverconsole, responseEnd, href, ext, uobject, search, "index.html", users, page404, head, foot, fd, modFunction, configJSON, callServerError, getCustomHeaders, origHref, redirect, parsePostData);
+ var useMods = mods;
+
+ if(isProxy) {
+ // Get list of forward proxy mods
+ useMods = [];
+ mods.forEach(function (mod) {
+ if (mod.proxyCallback !== undefined) useMods.push(mod);
+ });
}
+
+ useMods.reverse().forEach(function (modO) {
+ modFunction = modO.callback(req, res, serverconsole, responseEnd, href, ext, uobject, search, "index.html", users, page404, head, foot, fd, modFunction, configJSON, callServerError, getCustomHeaders, origHref, redirect, parsePostData);
+ });
// Execute modfunction
modFunction();
diff --git a/tests.html b/tests.html
index 9cccfce..7d49654 100644
--- a/tests.html
+++ b/tests.html
@@ -1,7 +1,7 @@
-
SVR.JS 3.9.2 Tests
+ SVR.JS 3.9.3 Tests
- SVR.JS 3.9.2 Tests
+ SVR.JS 3.9.3 Tests
Directory
Directory (with query)