mirror of
https://github.com/adnanh/webhook.git
synced 2026-07-26 17:10:45 +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 := ""
|
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 {
|
if len(req.Header.Get("X-Hub-Signature")) > 5 {
|
||||||
payloadSignature = req.Header.Get("X-Hub-Signature")[5:]
|
payloadSignature = req.Header.Get("X-Hub-Signature")[5:]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user