diff options
author | Bjørn Erik Pedersen <[email protected]> | 2022-10-26 12:54:50 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2022-10-26 12:54:50 +0200 |
commit | 00ff161b675ab16244bd9678807cb0b93240d1b1 (patch) | |
tree | d292eb0799486c056a7289f250e842d05846def8 /livereload | |
parent | 588710a7acb5f68e14a1fdc07228c4083b2884d4 (diff) | |
download | hugo-00ff161b675ab16244bd9678807cb0b93240d1b1.tar.gz hugo-00ff161b675ab16244bd9678807cb0b93240d1b1.zip |
livereload: Use text/javascript here, too
Diffstat (limited to 'livereload')
-rw-r--r-- | livereload/livereload.go | 3 |
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()) } |