mirror of
https://github.com/crazy-max/diun.git
synced 2025-12-21 13:04:59 +01:00
Merge pull request #1530 from crazy-max/gotify-token-header
gotify: use X-Gotify-Key header to send token
This commit is contained in:
@@ -86,7 +86,6 @@ func (c *Client) Send(entry model.NotifEntry) error {
|
||||
u.Path = path.Join(u.Path, "message")
|
||||
|
||||
q := u.Query()
|
||||
q.Set("token", token)
|
||||
u.RawQuery = q.Encode()
|
||||
|
||||
cancelCtx, cancel := context.WithCancelCause(context.Background())
|
||||
@@ -110,6 +109,7 @@ func (c *Client) Send(entry model.NotifEntry) error {
|
||||
req.Header.Set("Content-Type", "application/json")
|
||||
req.Header.Add("Content-Length", strconv.Itoa(len(string(jsonBody))))
|
||||
req.Header.Set("User-Agent", c.meta.UserAgent)
|
||||
req.Header.Set("X-Gotify-Key", token)
|
||||
|
||||
resp, err := hc.Do(req)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user