From 10e59f773097fd449813f61e86bd29fc259660da Mon Sep 17 00:00:00 2001 From: CarbonNeuron <16768821+CarbonNeuron@users.noreply.github.com> Date: Wed, 3 Feb 2021 09:51:21 -0600 Subject: [PATCH] Add Content-Type header to stats endpoint This fixes #7 --- internal/galactus/server.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/galactus/server.go b/internal/galactus/server.go index 49554c5..4351c48 100644 --- a/internal/galactus/server.go +++ b/internal/galactus/server.go @@ -233,6 +233,7 @@ func (galactus *GalactusAPI) indexHandler() func(w http.ResponseWriter, r *http. w.Header().Set("Access-Control-Allow-Origin", "*") w.Header().Set("Access-Control-Allow-Methods", "GET, OPTIONS") w.Header().Set("Access-Control-Allow-Headers", "Accept, Content-Type, Content-Length") + w.Header().Set("Content-Type", "application/json") //Set content type to Application/Json because we are serving json data // default to listing active games in the last 15 mins activeGames := rediskey.GetActiveGames(context.Background(), galactus.client, 900)