Merge pull request #249 from ftsell/master

add content-type header for /config.js
This commit is contained in:
Simone Gotti 2020-11-04 00:09:31 +01:00 committed by GitHub
commit e0756d6e61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -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)