Skip to content

Commit

Permalink
Fix Content-Type for /load.js, fixes #2
Browse files Browse the repository at this point in the history
  • Loading branch information
Irae Hueck Costa committed Sep 13, 2023
1 parent 388115a commit 8db3b37
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions endpoints/load.js.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ func init() {
// directory. In the deployment static files are taking from
// /state/static. This means NEW components files need to be
// manually touched after a deploy. As a workaround

ctx.W.Header().Set("Content-Type", "text/javascript")

files1, err := filepath.Glob("./static/components/*.js")
ctx.CatchError(err)
files2, err := filepath.Glob("./static/components/*/*.js")
Expand Down

0 comments on commit 8db3b37

Please sign in to comment.