chore: coding style and comments (#1361)
* chore: coding style and comments * chore: optimize `ParseJsonBody` (#1353) * chore: optimize `ParseJsonBody` * chore: optimize `ParseJsonBody` * fix: fix a test * chore: optimize `ParseJsonBody` * fix a test * chore: add comment * chore: refactor Co-authored-by: chenquan <chenquan.dev@foxmail.com>
This commit is contained in:
@@ -119,18 +119,10 @@ func VerifySignature(r *http.Request, securityHeader *ContentSecurityHeader, tol
|
||||
}, "\n")
|
||||
actualSignature := codec.HmacBase64(securityHeader.Key, signContent)
|
||||
|
||||
/*passed := securityHeader.Signature == actualSignature
|
||||
if !passed {
|
||||
logx.Infof("signature different, expect: %s, actual: %s",
|
||||
securityHeader.Signature, actualSignature)
|
||||
}
|
||||
|
||||
if passed {
|
||||
return httpx.CodeSignaturePass
|
||||
}*/
|
||||
if securityHeader.Signature == actualSignature {
|
||||
return httpx.CodeSignaturePass
|
||||
}
|
||||
|
||||
logx.Infof("signature different, expect: %s, actual: %s",
|
||||
securityHeader.Signature, actualSignature)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user