0

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:
Max 2024-03-05 06:40:57 +01:00 committed by GitHub
parent 8491d99eba
commit 96e73576af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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))
}