From 8db3b37d144c25e3d49f4444fe3f12731cb4979d Mon Sep 17 00:00:00 2001 From: Irae Hueck Costa Date: Wed, 13 Sep 2023 18:39:03 +0000 Subject: [PATCH] Fix Content-Type for /load.js, fixes #2 --- endpoints/load.js.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/endpoints/load.js.go b/endpoints/load.js.go index 0178c75..03c3063 100644 --- a/endpoints/load.js.go +++ b/endpoints/load.js.go @@ -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")