diff --git a/cmd/waku/server/rest/waku_rest.go b/cmd/waku/server/rest/waku_rest.go index 3126f37e..788982f3 100644 --- a/cmd/waku/server/rest/waku_rest.go +++ b/cmd/waku/server/rest/waku_rest.go @@ -38,7 +38,12 @@ func NewWakuRest(node *node.WakuNode, config RestConfig, log *zap.Logger) *WakuR mux := chi.NewRouter() mux.Use(middleware.Logger) mux.Use(middleware.NoCache) - + mux.Use(func(h http.Handler) http.Handler { + fn := func(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Access-Control-Allow-Origin", "*") + } + return http.HandlerFunc(fn) + }) if config.EnablePProf { mux.Mount("/debug", middleware.Profiler()) }