Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

set content-type for customjavascript (#3612)

Max5de8ed9ebacb
diff --git a/controllers/customJavascript.go b/controllers/customJavascript.go
index f20dfdf25f..dc6cf17a9a 100644
--- a/controllers/customJavascript.go
+++ b/controllers/customJavascript.go
@@ -8,6 +8,8 @@ import (
// ServeCustomJavascript will serve optional custom Javascript.
func ServeCustomJavascript(w http.ResponseWriter, r *http.Request) {
+ w.Header().Set("Content-Type", "text/javascript; charset=utf-8")
+
js := data.GetCustomJavascript()
_, _ = w.Write([]byte(js))
}