From 7cecdbb8561e03868392dde12a2c763e782c948b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Guillot?= Date: Wed, 29 Nov 2017 21:41:16 -0800 Subject: [PATCH] Add charset to CSS and JS mime type --- server/ui/controller/static.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/ui/controller/static.go b/server/ui/controller/static.go index fba408cd..ae468157 100644 --- a/server/ui/controller/static.go +++ b/server/ui/controller/static.go @@ -24,12 +24,12 @@ func (c *Controller) Stylesheet(ctx *core.Context, request *core.Request, respon etag += static.StylesheetsChecksums[stylesheet] } - response.Cache("text/css", etag, []byte(body), 48*time.Hour) + response.Cache("text/css; charset=utf-8", etag, []byte(body), 48*time.Hour) } // Javascript renders application client side code. func (c *Controller) Javascript(ctx *core.Context, request *core.Request, response *core.Response) { - response.Cache("text/javascript", static.JavascriptChecksums["app"], []byte(static.Javascript["app"]), 48*time.Hour) + response.Cache("text/javascript; charset=utf-8", static.JavascriptChecksums["app"], []byte(static.Javascript["app"]), 48*time.Hour) } // Favicon renders the application favicon.