summaryrefslogtreecommitdiffhomepage
path: root/modules
diff options
context:
space:
mode:
authorMatthew Holt <[email protected]>2022-09-23 14:36:38 -0600
committerMatthew Holt <[email protected]>2022-09-23 14:36:38 -0600
commitf7c1a51efb6d0e578c6f699b6f3498b5930cdd32 (patch)
treed8da4c94117fef84115a16aacc6bffa8238d0dd0 /modules
parenteead00f54a4b5d55292b2dcf5f1ec462c79207ad (diff)
downloadcaddy-f7c1a51efb6d0e578c6f699b6f3498b5930cdd32.tar.gz
caddy-f7c1a51efb6d0e578c6f699b6f3498b5930cdd32.zip
fastcgi: Redirect using original URI path (fix #5073)
Diffstat (limited to 'modules')
-rw-r--r--modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go b/modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go
index a9e6b220f..799050e97 100644
--- a/modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go
+++ b/modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go
@@ -348,7 +348,7 @@ func parsePHPFastCGI(h httpcaddyfile.Helper) ([]httpcaddyfile.ConfigValue, error
}
redirHandler := caddyhttp.StaticResponse{
StatusCode: caddyhttp.WeakString(strconv.Itoa(http.StatusPermanentRedirect)),
- Headers: http.Header{"Location": []string{"{http.request.uri.path}/"}},
+ Headers: http.Header{"Location": []string{"{http.request.orig_uri.path}/"}},
}
redirRoute := caddyhttp.Route{
MatcherSetsRaw: []caddy.ModuleMap{redirMatcherSet},