From 8cb8973846eb362cfff69f1b848db317d9d7b1c0 Mon Sep 17 00:00:00 2001 From: Finn-Thorben Sell Date: Fri, 30 Oct 2020 19:41:52 +0100 Subject: [PATCH] add content-type header for /config.js --- internal/services/gateway/handlers/webbundle.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/services/gateway/handlers/webbundle.go b/internal/services/gateway/handlers/webbundle.go index 54a7321..86c5f90 100644 --- a/internal/services/gateway/handlers/webbundle.go +++ b/internal/services/gateway/handlers/webbundle.go @@ -69,6 +69,7 @@ func NewWebBundleHandlerFunc(gatewayURL string) func(w http.ResponseWriter, r *h // config.js is the external webapp config file not provided by the // asset and not needed when served from the api server if r.URL.Path == "/config.js" { + w.Header().Add("Content-Type", "application/javascript") _, err := w.Write(config) if err != nil { http.Error(w, "", http.StatusInternalServerError)