From 26eed058f2c68f57c7cf7794de661f7a9c4237de Mon Sep 17 00:00:00 2001 From: Yuli Date: Sun, 12 Jul 2020 23:20:50 +0300 Subject: [PATCH] change cors header --- src/bunker.go | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bunker.go b/src/bunker.go index a66078e..e7f5bc0 100644 --- a/src/bunker.go +++ b/src/bunker.go @@ -165,6 +165,7 @@ func (e mainEnv) cookieSettings(w http.ResponseWriter, r *http.Request, ps httpr } resultUIConfJSON, _ := json.Marshal(e.conf.UI) finalJSON := fmt.Sprintf(`{"status":"ok","ui":%s,"rows":%s}`, resultUIConfJSON, resultJSON) + w.Header().Set("Access-Control-Allow-Origin", "*") w.Header().Set("Content-Type", "application/json; charset=utf-8") w.WriteHeader(200) w.Write([]byte(finalJSON))