mirror of
https://github.com/alvierahman90/gohookr.git
synced 2024-11-24 03:39:53 +00:00
Fix signature logic
This commit is contained in:
parent
39fe4748e1
commit
3cadcfbabe
3
main.go
3
main.go
@ -75,8 +75,7 @@ func webhookHandler(w http.ResponseWriter, r *http.Request) {
|
||||
)
|
||||
fmt.Printf("signature = %v\n", signature)
|
||||
fmt.Printf("calcuatedSignature = %v\n", calculatedSignature)
|
||||
if service.DisableSignatureVerification ||
|
||||
(signature != calculatedSignature && checkSignature) {
|
||||
if checkSignature && !service.DisableSignatureVerification && signature != calculatedSignature {
|
||||
writeResponse(w, 400, "Bad Request: Signatures do not match")
|
||||
fmt.Println("Signatures do not match!")
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user