Skip to content

Commit 68c793c

Browse files
committed
gotify: use X-Gotify-Key header to send token
1 parent d8684b9 commit 68c793c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/notif/gotify/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ func (c *Client) Send(entry model.NotifEntry) error {
8686
u.Path = path.Join(u.Path, "message")
8787

8888
q := u.Query()
89-
q.Set("token", token)
9089
u.RawQuery = q.Encode()
9190

9291
cancelCtx, cancel := context.WithCancelCause(context.Background())
@@ -110,6 +109,7 @@ func (c *Client) Send(entry model.NotifEntry) error {
110109
req.Header.Set("Content-Type", "application/json")
111110
req.Header.Add("Content-Length", strconv.Itoa(len(string(jsonBody))))
112111
req.Header.Set("User-Agent", c.meta.UserAgent)
112+
req.Header.Set("X-Gotify-Key", token)
113113

114114
resp, err := hc.Do(req)
115115
if err != nil {

0 commit comments

Comments
 (0)