mirror of https://github.com/status-im/go-waku.git
fix: rest api cors proper usage (#1075)
This commit is contained in:
parent
53e0ea6ac6
commit
e29cf0d191
|
@ -41,6 +41,7 @@ func NewWakuRest(node *node.WakuNode, config RestConfig, log *zap.Logger) *WakuR
|
|||
mux.Use(func(h http.Handler) http.Handler {
|
||||
fn := func(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Access-Control-Allow-Origin", "*")
|
||||
h.ServeHTTP(w, r)
|
||||
}
|
||||
return http.HandlerFunc(fn)
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue