Skip to content

Commit

Permalink
Merge pull request agola-io#249 from ftsell/master
Browse files Browse the repository at this point in the history
add content-type header for /config.js
  • Loading branch information
sgotti authored Nov 3, 2020
2 parents a101ab4 + b6a279a commit d576e98
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/services/gateway/handlers/webbundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d576e98

Please sign in to comment.