Matthew Holt
6 years ago
No known key found for this signature in database
GPG Key ID: 2A349DD577D586A5
1 changed files with
6 additions and
0 deletions
-
modules/caddyhttp/replacer.go
|
|
@ -79,6 +79,12 @@ func addHTTPVarsToReplacer(repl caddy.Replacer, req *http.Request, w http.Respon |
|
|
|
key := fmt.Sprintf("http.request.host.labels.%d", len(hostLabels)-i-1) |
|
|
|
m[key] = label |
|
|
|
} |
|
|
|
|
|
|
|
pathParts := strings.Split(req.URL.Path, "/") |
|
|
|
for i, label := range pathParts { |
|
|
|
key := fmt.Sprintf("http.request.uri.path.%d", i) |
|
|
|
m[key] = label |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if w != nil { |
|
|
|