aboutsummaryrefslogtreecommitdiffhomepage
path: root/livereload
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2022-10-26 12:54:50 +0200
committerBjørn Erik Pedersen <[email protected]>2022-10-26 12:54:50 +0200
commit00ff161b675ab16244bd9678807cb0b93240d1b1 (patch)
treed292eb0799486c056a7289f250e842d05846def8 /livereload
parent588710a7acb5f68e14a1fdc07228c4083b2884d4 (diff)
downloadhugo-00ff161b675ab16244bd9678807cb0b93240d1b1.tar.gz
hugo-00ff161b675ab16244bd9678807cb0b93240d1b1.zip
livereload: Use text/javascript here, too
Diffstat (limited to 'livereload')
-rw-r--r--livereload/livereload.go3
1 files changed, 2 insertions, 1 deletions
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())
}