Add content type to API error response (#8460)

Этот коммит содержится в:
Joram Wilander
2018-03-14 18:09:04 -04:00
коммит произвёл Derrick Anderson
родитель ddc6d49d80
Коммит d1ed79a66c

Просмотреть файл

@@ -59,6 +59,7 @@ func RenderWebError(w http.ResponseWriter, r *http.Request, status int, params u
return
}
w.Header().Set("Content-Type", "text/html")
w.WriteHeader(status)
fmt.Fprintln(w, `<!DOCTYPE html><html><head></head>`)
fmt.Fprintln(w, `<body onload="window.location = '`+template.HTMLEscapeString(template.JSEscapeString(destination))+`'">`)