add content-type header for /config.js
This commit is contained in:
parent
5b9bc38303
commit
8cb8973846
|
@ -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
|
// config.js is the external webapp config file not provided by the
|
||||||
// asset and not needed when served from the api server
|
// asset and not needed when served from the api server
|
||||||
if r.URL.Path == "/config.js" {
|
if r.URL.Path == "/config.js" {
|
||||||
|
w.Header().Add("Content-Type", "application/javascript")
|
||||||
_, err := w.Write(config)
|
_, err := w.Write(config)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
http.Error(w, "", http.StatusInternalServerError)
|
http.Error(w, "", http.StatusInternalServerError)
|
||||||
|
|
Loading…
Reference in New Issue