Commit 9c4e2586 authored by Hrishikesh Barman's avatar Hrishikesh Barman Committed by Goutham Veeramachaneni

corrected regex string check for anyorigin(*) (#5117)

Signed-off-by: 's avatarHrishikesh Barman <hrishikeshbman@gmail.com>
parent 24f19f03
......@@ -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
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment