Skip to content

Instantly share code, notes, and snippets.

@abhirockzz
Created November 15, 2018 07:10
Show Gist options
  • Save abhirockzz/8a1dfa72e4b64cab854410adbff88c35 to your computer and use it in GitHub Desktop.
Save abhirockzz/8a1dfa72e4b64cab854410adbff88c35 to your computer and use it in GitHub Desktop.
...
signatureFromGithub := fnCtx.Header().Get("X-Hub-Signature")
if !matchSignature(signatureFromGithub, fnCtx.Config()["github_webhook_secret"], payload) {
log.Println("Signature did not match. Webhook was not invoked by Github")
return
}
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment