diff --git a/util/httputil/cors.go b/util/httputil/cors.go index 6e0b5bbfc5..fdd5d3cd2c 100644 --- a/util/httputil/cors.go +++ b/util/httputil/cors.go @@ -36,7 +36,7 @@ func SetCORS(w http.ResponseWriter, o *regexp.Regexp, r *http.Request) { w.Header().Set(k, v) } - if o.String() == ".*" { + if o.String() == "^(?:.*)$" { w.Header().Set("Access-Control-Allow-Origin", "*") return }