mirror of
https://github.com/caddyserver/caddy.git
synced 2025-10-19 07:43:17 +00:00
try_files, rewrite: allow query string in try_files (fix #2891)
Also some minor cleanup/improvements discovered along the way
This commit is contained in:
parent
09a8517065
commit
5e9d81b507
4 changed files with 57 additions and 23 deletions
|
@ -190,11 +190,6 @@ func (rep replacer) do(r *http.Request, repl caddy.Replacer) bool {
|
|||
r.URL.Path = strings.Replace(oldPath, find, replace, lim)
|
||||
r.URL.RawQuery = strings.Replace(oldQuery, find, replace, lim)
|
||||
|
||||
// changed := r.URL.Path != oldPath && r.URL.RawQuery != oldQuery
|
||||
// if changed {
|
||||
// r.RequestURI = r.URL.RequestURI()
|
||||
// }
|
||||
|
||||
return r.URL.Path != oldPath && r.URL.RawQuery != oldQuery
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue