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.

git-svn-id: file:///srv/svn/repo/suika/trunk@371 f0ae65fe-ee39-954e-97ec-027ff2717ef4
This commit is contained in:
contact 2020-07-22 16:07:55 +00:00
parent 1e0e265c48
commit d2f7a0ec1b

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 {