Setting correct content-type for JSONP

This commit is contained in:
Deluan
2020-01-09 00:18:55 -05:00
committed by Deluan Quintão
parent 84d69a4f41
commit 542bea6fcc
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -123,7 +123,7 @@ func SendResponse(w http.ResponseWriter, r *http.Request, payload *responses.Sub
wrapper := &responses.JsonWrapper{Subsonic: *payload}
response, _ = json.Marshal(wrapper)
case "jsonp":
w.Header().Set("Content-Type", "application/json")
w.Header().Set("Content-Type", "application/javascript")
callback := ParamString(r, "callback")
wrapper := &responses.JsonWrapper{Subsonic: *payload}
data, _ := json.Marshal(wrapper)