diff options
author | Matthew Holt <[email protected]> | 2019-09-10 14:12:51 -0600 |
---|---|---|
committer | Matthew Holt <[email protected]> | 2019-09-10 14:12:51 -0600 |
commit | c32b7e8865224b124a9be999317f87d45e2b2a48 (patch) | |
tree | 71bb46036b12ee048fac847672f98c4e4b89f2c3 /modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go | |
parent | 1ce10b453fbfd01aae7887c4ff8e5730f7908f50 (diff) | |
download | caddy-c32b7e8865224b124a9be999317f87d45e2b2a48.tar.gz caddy-c32b7e8865224b124a9be999317f87d45e2b2a48.zip |
fastcgi: Make EnvVars a map instead of a slice
Diffstat (limited to 'modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go')
-rw-r--r-- | modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go b/modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go index c8b9f63cb..6fa63bebb 100644 --- a/modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go +++ b/modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go @@ -44,7 +44,10 @@ func (t *Transport) UnmarshalCaddyfile(d *caddyfile.Dispenser) error { if len(args) != 2 { return d.ArgErr() } - t.EnvVars = append(t.EnvVars, [2]string{args[0], args[1]}) + if t.EnvVars == nil { + t.EnvVars = make(map[string]string) + } + t.EnvVars[args[0]] = args[1] default: return d.Errf("unrecognized subdirective %s", d.Val()) |