style: using is struct to handle all judgements global envs
This commit is contained in:
+1
-1
@@ -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")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user