mirror of
https://github.com/xiaoxinpro/nginx-proxy-manager-zh.git
synced 2025-01-23 13:18:14 -05:00
Tweak config content
This commit is contained in:
parent
5586d16afd
commit
6147ee925e
@ -191,12 +191,7 @@ func GetHostNginxConfig(format string) func(http.ResponseWriter, *http.Request)
|
|||||||
h.ResultResponseText(w, r, http.StatusOK, content)
|
h.ResultResponseText(w, r, http.StatusOK, content)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
h.ResultResponseJSON(w, r, http.StatusOK, content)
|
||||||
j := struct {
|
|
||||||
Content string `json:"content"`
|
|
||||||
}{Content: content}
|
|
||||||
|
|
||||||
h.ResultResponseJSON(w, r, http.StatusOK, j)
|
|
||||||
default:
|
default:
|
||||||
h.ResultErrorJSON(w, r, http.StatusBadRequest, err.Error(), nil)
|
h.ResultErrorJSON(w, r, http.StatusBadRequest, err.Error(), nil)
|
||||||
}
|
}
|
||||||
|
@ -144,12 +144,7 @@ func GetUpstreamNginxConfig(format string) func(http.ResponseWriter, *http.Reque
|
|||||||
h.ResultResponseText(w, r, http.StatusOK, content)
|
h.ResultResponseText(w, r, http.StatusOK, content)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
h.ResultResponseJSON(w, r, http.StatusOK, content)
|
||||||
j := struct {
|
|
||||||
Content string `json:"content"`
|
|
||||||
}{Content: content}
|
|
||||||
|
|
||||||
h.ResultResponseJSON(w, r, http.StatusOK, j)
|
|
||||||
default:
|
default:
|
||||||
h.ResultErrorJSON(w, r, http.StatusBadRequest, err.Error(), nil)
|
h.ResultErrorJSON(w, r, http.StatusBadRequest, err.Error(), nil)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user