1
0
Fork 0
forked from svrjs/svrjs

Fix syntax error from previous commit.

This commit is contained in:
Dorian Niemiec 2024-01-24 18:53:29 +00:00
parent 5fdbc898d0
commit e29d1aa3aa

2
svr.js
View file

@ -4263,7 +4263,7 @@ if (!cluster.isPrimary) {
var postfixPrefix = "";
wwwrootPostfixPrefixesVHost.every(function (currentPostfixPrefix) {
if (req.url.indexOf(currentPostfixPrefix) == 0) {
if(currentPostfixPrefix.match(/\/+$/) postfixPrefix = currentPostfixPrefix.replace(/\/+$/,""));
if (currentPostfixPrefix.match(/\/+$/)) postfixPrefix = currentPostfixPrefix.replace(/\/+$/,"");
else postfixPrefix = currentPostfixPrefix;
urlWithPostfix = urlWithPostFix.substr(postfixPrefix.length);
return false;