From 215c35344939f40d7c8e4fe15f32b3937ef52b76 Mon Sep 17 00:00:00 2001 From: Sacha Ligthert Date: Thu, 18 Jan 2024 23:40:03 +0000 Subject: [PATCH] Return CORS headers, that allow everything. --- http_listener.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/http_listener.go b/http_listener.go index b4645d0..19b57da 100644 --- a/http_listener.go +++ b/http_listener.go @@ -7,5 +7,7 @@ import ( func (pool *Pool) getRoot(w http.ResponseWriter, r *http.Request) { //fmt.Printf("got / request\n") + w.Header().Set("Content-Type", "application/json") + w.Header().Set("Access-Control-Allow-Origin", "*") io.WriteString(w, string(pool.jsonst)+"\n") }