summaryrefslogtreecommitdiffstats
path: root/livereload/livereload.go
diff options
context:
space:
mode:
authorbep <bjorn.erik.pedersen@gmail.com>2014-10-15 13:26:21 +0200
committerspf13 <steve.francia@gmail.com>2014-10-15 12:45:29 -0400
commit24bbfe7d32fe151487ff87394433622e3f69eee4 (patch)
treea3375824b08cf539b4cf4d80cfc84f2a280214ea /livereload/livereload.go
parent0167fb480317749e24a7a5feb22a8d4e475873ce (diff)
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
Diffstat (limited to 'livereload/livereload.go')
-rw-r--r--livereload/livereload.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/livereload/livereload.go b/livereload/livereload.go
index 29a6168a5..1b1546158 100644
--- a/livereload/livereload.go
+++ b/livereload/livereload.go
@@ -48,6 +48,7 @@ func RefreshPath(s string) {
}
func ServeJS(w http.ResponseWriter, r *http.Request) {
+ w.Header().Set("Content-Type", "application/javascript")
w.Write(livereloadJS)
}