config: make http-origin directive overwrite previous list

Let's be on the safe side and assume the user doesn't meant the union of
all directive values.
This commit is contained in:
Simon Ser 2020-07-22 18:07:55 +02:00
parent ef2dd479bf
commit 2793698dbb
No known key found for this signature in database
GPG Key ID: 0FDE7BE0E88F5E48

View File

@ -118,7 +118,7 @@ func Parse(r io.Reader) (*Server, error) {
return nil, err return nil, err
} }
case "http-origin": case "http-origin":
srv.HTTPOrigins = append(srv.HTTPOrigins, d.Params...) srv.HTTPOrigins = d.Params
case "accept-proxy-ip": case "accept-proxy-ip":
srv.AcceptProxyIPs = nil srv.AcceptProxyIPs = nil
for _, s := range d.Params { for _, s := range d.Params {