fastcgi: Redirect using original URI path (fix #5073)

This commit is contained in:
Matthew Holt 2022-09-23 14:36:38 -06:00
parent eead00f54a
commit f7c1a51efb
No known key found for this signature in database
GPG Key ID: 2A349DD577D586A5
1 changed files with 1 additions and 1 deletions

View File

@ -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},