mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-05-30 18:29:16 +02:00
Upstream access token
This commit is contained in:
parent
f13a654fe8
commit
25d3a66f91
9 changed files with 144 additions and 50 deletions
server
|
@ -855,7 +855,11 @@ func (s *Server) forwardPollRequest(v *visitor, m *message) {
|
|||
logvm(v, m).Err(err).Warn("Unable to publish poll request")
|
||||
return
|
||||
}
|
||||
req.Header.Set("User-Agent", "ntfy/"+s.config.Version)
|
||||
req.Header.Set("X-Poll-ID", m.ID)
|
||||
if s.config.UpstreamAccessToken != "" {
|
||||
req.Header.Set("Authorization", util.BearerAuth(s.config.UpstreamAccessToken))
|
||||
}
|
||||
var httpClient = &http.Client{
|
||||
Timeout: time.Second * 10,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue