Add default Content-Type: application/json header for custom detector verification request (#4947)

* added content-type=application/json as default header

* improv: set content type header when it is not present in the config

* handled canonicalization
This commit is contained in:
Muneeb Ullah Khan
2026-05-05 10:34:33 +05:00
committed by GitHub
parent 5f47aad1c2
commit 90ca685b33
+3
View File
@@ -293,6 +293,9 @@ func (c *CustomRegexWebhook) createResults(ctx context.Context, match map[string
}
req.Header.Add(key, strings.TrimLeft(value, "\t\n\v\f\r "))
}
if req.Header.Get("Content-Type") == "" {
req.Header.Set("Content-Type", "application/json")
}
resp, err := httpClient.Do(req)
if err != nil {
continue