Add Access-Control-Allow-Origin: * to all responses
This commit is contained in:
parent
152a7664bd
commit
09d2e16ed2
|
@ -476,6 +476,8 @@ func (mb *MessageBus) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
}()
|
||||
|
||||
w.Header().Set("Access-Control-Allow-Origin", "*")
|
||||
|
||||
if r.Method == "GET" && (r.URL.Path == "/" || r.URL.Path == "") {
|
||||
// XXX: guard with a mutex?
|
||||
out, err := json.Marshal(mb.topics)
|
||||
|
|
Loading…
Reference in New Issue