Add content type to API error response (#8460)
Этот коммит содержится в:
коммит произвёл
Derrick Anderson
родитель
ddc6d49d80
Коммит
d1ed79a66c
@@ -59,6 +59,7 @@ func RenderWebError(w http.ResponseWriter, r *http.Request, status int, params u
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
w.Header().Set("Content-Type", "text/html")
|
||||||
w.WriteHeader(status)
|
w.WriteHeader(status)
|
||||||
fmt.Fprintln(w, `<!DOCTYPE html><html><head></head>`)
|
fmt.Fprintln(w, `<!DOCTYPE html><html><head></head>`)
|
||||||
fmt.Fprintln(w, `<body onload="window.location = '`+template.HTMLEscapeString(template.JSEscapeString(destination))+`'">`)
|
fmt.Fprintln(w, `<body onload="window.location = '`+template.HTMLEscapeString(template.JSEscapeString(destination))+`'">`)
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user