mirror of
https://github.com/adnanh/webhook.git
synced 2026-07-26 17:19:17 +08:00
github hookshot user agent fix
This commit is contained in:
+1
-1
@@ -122,7 +122,7 @@ func hookHandler(req *http.Request, params martini.Params) string {
|
||||
|
||||
payloadSignature := ""
|
||||
|
||||
if strings.Contains(req.Header.Get("User-Agent"), "Github") {
|
||||
if strings.Contains(req.Header.Get("User-Agent"), "GitHub-Hookshot") {
|
||||
if len(req.Header.Get("X-Hub-Signature")) > 5 {
|
||||
payloadSignature = req.Header.Get("X-Hub-Signature")[5:]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user