fea: control snat by cmd.
Some checks are pending
Coverage CI / build (push) Waiting to run
CodeQL / Analyze (go) (push) Waiting to run
Ubuntu CI / build (push) Waiting to run

This commit is contained in:
Daniel Ding
2024-10-22 10:48:33 +08:00
parent 49ecf383f4
commit a1fd32cb0b
13 changed files with 134 additions and 22 deletions

View File

@@ -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)