Skip to content

Commit

Permalink
set headers with common package
Browse files Browse the repository at this point in the history
  • Loading branch information
atavism committed Jun 24, 2024
1 parent 06d5677 commit 4e2b70d
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions internalsdk/pro/pro.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"
"encoding/json"
"net/http"
"net/http/httputil"
"strings"

"github.com/getlantern/errors"
Expand Down Expand Up @@ -73,11 +72,7 @@ func (c *proClient) setUserHeaders() func(client *resty.Client, req *http.Reques
common.ProTokenHeader,
common.UserIdHeader,
}, ", "))
// Add auth headers only if not present, to avoid race conditions when creating new user or switching user, i.e., linking device
// to a new account.
common.AddCommonHeadersWithOptions(uc, req, false)
d, _ := httputil.DumpRequest(req, false)
log.Debugf("Dump is %s", string(d))
return nil
}
}
Expand Down

0 comments on commit 4e2b70d

Please sign in to comment.