mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
livereload: Use text/javascript here, too
This commit is contained in:
parent
588710a7ac
commit
00ff161b67
1 changed files with 2 additions and 1 deletions
|
@ -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())
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue