1
0
Fork 0
forked from svrjs/svrjs

Disabled trailing slash redirection for proxy requests

This commit is contained in:
Dorian Niemiec 2024-04-02 17:33:21 +02:00
parent ee568d252e
commit 9bd64cc65a

2
svr.js
View file

@ -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 {