mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
Set Content-Type for livereload.js
The Content-Type was not set for livereload.js and was interpreteted by the browser as text/plain. This commit sets it to application/javascript. Fixes #562
This commit is contained in:
@@ -48,6 +48,7 @@ func RefreshPath(s string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func ServeJS(w http.ResponseWriter, r *http.Request) {
|
func ServeJS(w http.ResponseWriter, r *http.Request) {
|
||||||
|
w.Header().Set("Content-Type", "application/javascript")
|
||||||
w.Write(livereloadJS)
|
w.Write(livereloadJS)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user