Report traffic for all download tokens

This commit is contained in:
Ben Adrian Sarmiento
2024-07-04 04:14:39 +02:00
parent 49432dd810
commit 38a1a9e096
5 changed files with 59 additions and 33 deletions

View File

@@ -129,7 +129,7 @@ func NewHTTPClient(
}
func (r *HTTPClient) Do(req *http.Request) (*http.Response, error) {
if r.token != "" {
if r.token != "" && req.Header.Get("Authorization") == "" {
req.Header.Set("Authorization", "Bearer "+r.token)
}