Skip to content

Commit c301082

Browse files
authored
Merge branch 'main' into BarryCarlyon-patch-2
2 parents adefb2d + b6648d9 commit c301082

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

internal/events/verify/subscription_verify.go

+6
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,12 @@ func VerifyWebhookSubscription(p VerifyParameters) (VerifyResponse, error) {
9494
r.IsChallengeValid = false
9595
}
9696

97+
if resp.Header.Get("Content-Type") == "text/plain" {
98+
color.New().Add(color.FgGreen).Println(fmt.Sprintf(`✔ Valid content-type header. Received type %v`, resp.Header.Get("Content-Type")))
99+
} else {
100+
color.New().Add(color.FgRed).Println(fmt.Sprintf(`✗ Invalid content-type header. Received type %v`, resp.Header.Get("Content-Type")))
101+
}
102+
97103
if resp.StatusCode >= 200 && resp.StatusCode <= 299 {
98104
color.New().Add(color.FgGreen).Println(fmt.Sprintf(`✔ Valid status code. Received status %v`, resp.StatusCode))
99105
r.IsStatusValid = true

0 commit comments

Comments
 (0)