mirror of
https://github.com/owncast/owncast.git
synced 2025-11-02 03:54:54 +08:00
set content-type for customjavascript (#3612)
* set content-type for customjavascript * change content-type in order to comply with RFC 9239
This commit is contained in:
@ -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))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user