From 9bd64cc65a7d5c3d0d8ee5a37329886a9dbe281f Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Tue, 2 Apr 2024 17:33:21 +0200 Subject: [PATCH] Disabled trailing slash redirection for proxy requests --- svr.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svr.js b/svr.js index 4cdee5c..55aef03 100644 --- a/svr.js +++ b/svr.js @@ -4242,7 +4242,7 @@ if (!cluster.isPrimary) { // Trailing slash redirection function redirectTrailingSlashes(callback) { - if (!disableTrailingSlashRedirects && href[href.length - 1] != "/" && origHref[origHref.length - 1] != "/") { + if (!isProxy && !disableTrailingSlashRedirects && href[href.length - 1] != "/" && origHref[origHref.length - 1] != "/") { fs.stat("." + decodeURIComponent(href), function (err, stats) { if (err || !stats.isDirectory()) { try {