From 00ff161b675ab16244bd9678807cb0b93240d1b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Wed, 26 Oct 2022 12:54:50 +0200 Subject: [PATCH] livereload: Use text/javascript here, too --- livereload/livereload.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/livereload/livereload.go b/livereload/livereload.go index 246928884..16957a7cc 100644 --- a/livereload/livereload.go +++ b/livereload/livereload.go @@ -45,6 +45,7 @@ import ( _ "embed" + "github.com/gohugoio/hugo/media" "github.com/gorilla/websocket" ) @@ -144,7 +145,7 @@ func refreshPathForPort(s string, port int) { // ServeJS serves the liverreload.js who's reference is injected into the page. func ServeJS(w http.ResponseWriter, r *http.Request) { - w.Header().Set("Content-Type", "application/javascript") + w.Header().Set("Content-Type", media.JavascriptType.Type()) w.Write(liveReloadJS()) }