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:
parent
8491d99eba
commit
96e73576af
@ -8,6 +8,8 @@ import (
|
|||||||
|
|
||||||
// ServeCustomJavascript will serve optional custom Javascript.
|
// ServeCustomJavascript will serve optional custom Javascript.
|
||||||
func ServeCustomJavascript(w http.ResponseWriter, r *http.Request) {
|
func ServeCustomJavascript(w http.ResponseWriter, r *http.Request) {
|
||||||
|
w.Header().Set("Content-Type", "text/javascript; charset=utf-8")
|
||||||
|
|
||||||
js := data.GetCustomJavascript()
|
js := data.GetCustomJavascript()
|
||||||
_, _ = w.Write([]byte(js))
|
_, _ = w.Write([]byte(js))
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user