fix: json content type breaks web ui
This commit is contained in:
parent
3bf9f02a9f
commit
d3e32f944a
|
@ -52,6 +52,7 @@ func apiV1Handler() http.Handler {
|
||||||
|
|
||||||
func apiV1(w http.ResponseWriter, r *http.Request) {
|
func apiV1(w http.ResponseWriter, r *http.Request) {
|
||||||
ct := r.Context()
|
ct := r.Context()
|
||||||
|
w.Header().Set("Content-Type", "application/json")
|
||||||
|
|
||||||
//nolint: errcheck
|
//nolint: errcheck
|
||||||
if conf.AuthFailBlock && !auth.IsAuth(ct) {
|
if conf.AuthFailBlock && !auth.IsAuth(ct) {
|
||||||
|
|
|
@ -144,7 +144,6 @@ func routeHandler() (http.Handler, error) {
|
||||||
|
|
||||||
fn := func(w http.ResponseWriter, r *http.Request) {
|
fn := func(w http.ResponseWriter, r *http.Request) {
|
||||||
w.Header().Set("Server", serverName)
|
w.Header().Set("Server", serverName)
|
||||||
w.Header().Set("Content-type", "application/json")
|
|
||||||
mux.ServeHTTP(w, r)
|
mux.ServeHTTP(w, r)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue