diff options
Diffstat (limited to 'modules/caddyhttp/replacer.go')
-rw-r--r-- | modules/caddyhttp/replacer.go | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/modules/caddyhttp/replacer.go b/modules/caddyhttp/replacer.go index 6feb143..16cc1fe 100644 --- a/modules/caddyhttp/replacer.go +++ b/modules/caddyhttp/replacer.go @@ -13,9 +13,7 @@ import ( // TODO: A simple way to format or escape or encode each value would be nice // ... TODO: Should we just use templates? :-/ yeesh... -func newReplacer(req *http.Request, w http.ResponseWriter) caddy2.Replacer { - repl := caddy2.NewReplacer() - +func addHTTPVarsToReplacer(repl caddy2.Replacer, req *http.Request, w http.ResponseWriter) { httpVars := func() map[string]string { m := make(map[string]string) if req != nil { @@ -78,6 +76,4 @@ func newReplacer(req *http.Request, w http.ResponseWriter) caddy2.Replacer { } repl.Map(httpVars) - - return repl } |