Merge pull request #655 from mattermost/content-type
Set default Content-Type to application/json for all API requests
Этот коммит содержится в:
@@ -106,6 +106,9 @@ func (h handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
if !h.isApi {
|
||||
w.Header().Set("X-Frame-Options", "DENY")
|
||||
w.Header().Set("Content-Security-Policy", "frame-ancestors none")
|
||||
} else {
|
||||
// All api response bodies will be JSON formatted
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
}
|
||||
|
||||
sessionId := ""
|
||||
|
||||
Ссылка в новой задаче
Block a user