feat: add user-agent http header for thirdparty sdks

This commit is contained in:
Fu Diwei
2025-05-28 10:46:02 +08:00
parent ddb46f9dda
commit 829fa29cf1
30 changed files with 66 additions and 43 deletions

View File

@@ -57,8 +57,9 @@ func (n *NotifierProvider) Notify(ctx context.Context, subject string, message s
// REF: https://gotify.net/api-docs#/message/createMessage
req := n.httpClient.R().
SetContext(ctx).
SetHeader("Content-Type", "application/json").
SetHeader("Authorization", "Bearer "+n.config.Token).
SetHeader("Content-Type", "application/json").
SetHeader("User-Agent", "certimate").
SetBody(map[string]any{
"title": subject,
"message": message,