修复mac手机版客户端重连的问题

This commit is contained in:
bjdgyc
2024-03-12 18:08:05 +08:00
parent 03467e4f06
commit edf33ba4ae
9 changed files with 69 additions and 60 deletions

View File

@@ -84,6 +84,7 @@ func authMiddleware(next http.Handler) http.Handler {
w.Header().Set("Access-Control-Allow-Methods", "GET,POST,OPTIONS")
w.Header().Set("Access-Control-Allow-Headers", "*")
if r.Method == http.MethodOptions {
// w.WriteHeader(http.StatusOK)
// 正式环境不支持 OPTIONS
w.WriteHeader(http.StatusForbidden)
return