From 6c3836369400c67f39768b9cdcbb18842afa68db Mon Sep 17 00:00:00 2001 From: Sacha Ligthert Date: Sat, 8 Feb 2025 15:34:37 +0100 Subject: [PATCH] =?UTF-8?q?Allow=20us=20to=20view=20stored=20data=20in=20r?= =?UTF-8?q?eal-time!=20=F0=9F=A5=B3=F0=9F=A5=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/agents.html | 63 ++++++++++++++++++++++++++++++++++++++++++++ server/jsonDumper.go | 1 + 2 files changed, 64 insertions(+) create mode 100644 server/agents.html diff --git a/server/agents.html b/server/agents.html new file mode 100644 index 0000000..e75adba --- /dev/null +++ b/server/agents.html @@ -0,0 +1,63 @@ + + + + + + JSON Data Display + + + +

JSON Data Display

+
+ +
+ + + + \ No newline at end of file diff --git a/server/jsonDumper.go b/server/jsonDumper.go index 3ea8abf..3e3d698 100644 --- a/server/jsonDumper.go +++ b/server/jsonDumper.go @@ -13,6 +13,7 @@ func (server *Server) jsonDumper(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusInternalServerError) w.Write([]byte("This is my Website")) } + w.Header().Set("Access-Control-Allow-Origin", "*") w.Header().Set("Content-Type", "application/json") w.WriteHeader(http.StatusOK) w.Write(json)