瀏覽代碼

refactor(api): 调整 Web 转发协议字段属性

移除了 BackendList 结构体中 Protocol 字段的 "omitempty" 标签,确保协议字段在 JSON 中始终存在。
fusu 1 月之前
父節點
當前提交
517e5183c3
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      api/v1/webForwarding.go

+ 1 - 1
api/v1/webForwarding.go

@@ -79,7 +79,7 @@ type WebForwardingRequire struct {
 
 type BackendList struct {
 	Addr     string `json:"addr,omitempty" form:"addr"`
-	Protocol string `json:"protocol,omitempty" form:"protocol"`
+	Protocol string `json:"protocol" form:"protocol"`
 	Timeout  string `json:"timeout,omitempty" form:"timeout" default:"30s"`
 	ProxyV1  bool `json:"proxy_v1,omitempty" form:"proxy_v1" default:"false"`
 }