mirror of
https://github.com/luscis/openlan.git
synced 2025-10-05 08:36:59 +08:00
fea: control snat by cmd.
This commit is contained in:
@@ -32,7 +32,7 @@ func ResponseMsg(w http.ResponseWriter, code int, message string) {
|
||||
func ResponseYaml(w http.ResponseWriter, v interface{}) {
|
||||
str, err := yaml.Marshal(v)
|
||||
if err == nil {
|
||||
w.Header().Set("Content-Type", "application/yaml")
|
||||
w.Header().Set("Content-Type", "text/plain")
|
||||
_, _ = w.Write(str)
|
||||
} else {
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
|
Reference in New Issue
Block a user