Merge pull request #12 from Natureshadow/feature-cors
Send Origin back as Access-Control-Allow-Origin
This commit is contained in:
commit
9f7e837262
|
@ -176,6 +176,9 @@ func MuxSecAllowedDomainsHandler(next http.Handler) http.Handler {
|
|||
return
|
||||
}
|
||||
|
||||
// Send the allowed origin back as CORS header
|
||||
w.Header().Set("Access-Control-Allow-Origin", r.Header["Origin"][0])
|
||||
|
||||
next.ServeHTTP(w, r)
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue