diff --git a/pkg/providers/github.go b/pkg/providers/github.go index 8a1688d..d4b57e7 100644 --- a/pkg/providers/github.go +++ b/pkg/providers/github.go @@ -17,9 +17,10 @@ const ( // Header constants const ( - XHubSignature = "X-Hub-Signature" - XGitHubEvent = "X-GitHub-Event" - XGitHubDelivery = "X-GitHub-Delivery" + XHubSignature = "X-Hub-Signature" + XGitHubEvent = "X-GitHub-Event" + XGitHubDelivery = "X-GitHub-Delivery" + XHubSignature256 = "X-Hub-Signature-256" ) const ( @@ -39,16 +40,9 @@ func NewGithubProvider(secret string) (*GithubProvider, error) { } func (p *GithubProvider) GetHeaderKeys() []string { - if len(strings.TrimSpace(p.secret)) > 0 { - return []string{ - XHubSignature, - XGitHubDelivery, - XGitHubEvent, - ContentTypeHeader, - } - } - return []string{ + XHubSignature, + XHubSignature256, XGitHubDelivery, XGitHubEvent, ContentTypeHeader, diff --git a/pkg/providers/github_test.go b/pkg/providers/github_test.go index 8a1bbd0..8ab66c7 100644 --- a/pkg/providers/github_test.go +++ b/pkg/providers/github_test.go @@ -71,7 +71,7 @@ func TestGithubProvider_GetHeaderKeys(t *testing.T) { }{ { name: "TestGetHeaderKeysWithCorrectValues", - want: []string{XGitHubDelivery, XGitHubEvent, ContentTypeHeader}, + want: []string{XHubSignature, XHubSignature256, XGitHubDelivery, XGitHubEvent, ContentTypeHeader}, }, } for _, tt := range tests {