forked from svrjs/svrjs
Disabled trailing slash redirection for proxy requests
This commit is contained in:
parent
ee568d252e
commit
9bd64cc65a
1 changed files with 1 additions and 1 deletions
2
svr.js
2
svr.js
|
@ -4242,7 +4242,7 @@ if (!cluster.isPrimary) {
|
||||||
|
|
||||||
// Trailing slash redirection
|
// Trailing slash redirection
|
||||||
function redirectTrailingSlashes(callback) {
|
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) {
|
fs.stat("." + decodeURIComponent(href), function (err, stats) {
|
||||||
if (err || !stats.isDirectory()) {
|
if (err || !stats.isDirectory()) {
|
||||||
try {
|
try {
|
||||||
|
|
Reference in a new issue