diff --git a/server/go.mod b/server/go.mod index f0ec6732..ef1a275f 100644 --- a/server/go.mod +++ b/server/go.mod @@ -43,7 +43,7 @@ require ( ) require ( - github.com/aliyun/alibaba-cloud-sdk-go v1.62.679 // indirect + github.com/aliyun/alibaba-cloud-sdk-go v1.62.680 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cloudflare/cloudflare-go v0.88.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect @@ -61,8 +61,8 @@ require ( github.com/sagikazarmark/locafero v0.4.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sourcegraph/conc v0.3.0 // indirect - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.859 // indirect - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.859 // indirect + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.860 // indirect + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.860 // indirect github.com/toorop/go-dkim v0.0.0-20240103092955-90b7d1423f92 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.uber.org/multierr v1.11.0 // indirect diff --git a/server/handler/link_tunnel.go b/server/handler/link_tunnel.go index cf96ee0d..3c7eb097 100644 --- a/server/handler/link_tunnel.go +++ b/server/handler/link_tunnel.go @@ -43,13 +43,13 @@ func LinkTunnel(w http.ResponseWriter, r *http.Request) { // 判断session-token的值 cookie, err := r.Cookie("webvpn") if err != nil || cookie.Value == "" { - w.WriteHeader(http.StatusBadRequest) + w.WriteHeader(http.StatusUnauthorized) return } sess := sessdata.SToken2Sess(cookie.Value) if sess == nil { - w.WriteHeader(http.StatusBadRequest) + w.WriteHeader(http.StatusUnauthorized) return } @@ -57,7 +57,7 @@ func LinkTunnel(w http.ResponseWriter, r *http.Request) { cSess := sess.NewConn() if cSess == nil { log.Println(err) - w.WriteHeader(http.StatusBadRequest) + w.WriteHeader(http.StatusUnauthorized) return }