style: using is struct to handle all judgements global envs

This commit is contained in:
2026-04-02 21:38:50 +08:00
parent aa22b04a1f
commit 78bd1cb3cc
5 changed files with 48 additions and 27 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ func Auth(w http.ResponseWriter, r *http.Request, targetMethod string, allowedUs
return 0, fmt.Errorf("Method not allowed: %s", targetMethod)
}
if !isDebug && !ValidateTimeStamp(r.Header) {
if !is.debug && !ValidateTimeStamp(r.Header) {
return 0, fmt.Errorf("Invalid or missing X-Timestamp in header")
}