mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 04:10:20 +08:00
Add headers to webhook.
This commit is contained in:
@ -33,6 +33,10 @@ func sendWebhook(webhook *Webhook, record *Record) error {
|
||||
|
||||
req.Header.Set("Content-Type", webhook.ContentType)
|
||||
|
||||
for _, header := range webhook.Headers {
|
||||
req.Header.Set(header.Name, header.Value)
|
||||
}
|
||||
|
||||
_, err = client.Do(req)
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user