mirror of
https://github.com/caddyserver/caddy.git
synced 2025-10-19 07:43:17 +00:00
Fix up matchers tests and take care of TODO in rewrite
This commit is contained in:
parent
9d54f655aa
commit
67d32e6779
3 changed files with 9 additions and 10 deletions
|
@ -48,16 +48,17 @@ func addHTTPVarsToReplacer(repl caddy2.Replacer, req *http.Request, w http.Respo
|
|||
dir, _ := path.Split(req.URL.Path)
|
||||
return dir
|
||||
}()
|
||||
m["http.request.uri.query"] = req.URL.RawQuery
|
||||
|
||||
for param, vals := range req.URL.Query() {
|
||||
m["http.request.uri.query."+param] = strings.Join(vals, ",")
|
||||
}
|
||||
for field, vals := range req.Header {
|
||||
m["http.request.header."+strings.ToLower(field)] = strings.Join(vals, ",")
|
||||
}
|
||||
for _, cookie := range req.Cookies() {
|
||||
m["http.request.cookie."+cookie.Name] = cookie.Value
|
||||
}
|
||||
for param, vals := range req.URL.Query() {
|
||||
m["http.request.uri.query."+param] = strings.Join(vals, ",")
|
||||
}
|
||||
|
||||
hostLabels := strings.Split(req.Host, ".")
|
||||
for i, label := range hostLabels {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue