http: Remove {...query_string} placeholder, in favor of {...query}

I am not sure if the query_string one is necessary or useful yet. We
can always add it later if needed.
This commit is contained in:
Matthew Holt
2020-01-10 17:02:11 -07:00
parent d418e319ab
commit 2eda21ec6d
4 changed files with 2 additions and 9 deletions
-5
View File
@@ -104,8 +104,6 @@ func addHTTPVarsToReplacer(repl *caddy.Replacer, req *http.Request, w http.Respo
return dir, true
case "http.request.uri.query":
return req.URL.RawQuery, true
case "http.request.uri.query_string":
return "?" + req.URL.RawQuery, true
// original request, before any internal changes
case "http.request.orig_method":
@@ -128,9 +126,6 @@ func addHTTPVarsToReplacer(repl *caddy.Replacer, req *http.Request, w http.Respo
case "http.request.orig_uri.query":
or, _ := req.Context().Value(OriginalRequestCtxKey).(http.Request)
return or.URL.RawQuery, true
case "http.request.orig_uri.query_string":
or, _ := req.Context().Value(OriginalRequestCtxKey).(http.Request)
return "?" + or.URL.RawQuery, true
}
// hostname labels