Skip to content

Commit

Permalink
client: Fix user API URL
Browse files Browse the repository at this point in the history
The User API as defined by ota-lite wants a trailing slash. ota-lite
sends a redirect back with the trailing slash. However, certainer
certain reverse-proxies (GCP in our case) will try and resend the
request but omit the auth header which results in our API getting an
HTTP 401 response.

Signed-off-by: Andy Doan <[email protected]>
  • Loading branch information
doanac authored and detsch committed Sep 22, 2023
1 parent 98922f3 commit f82c551
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/foundries.go
Original file line number Diff line number Diff line change
Expand Up @@ -1628,7 +1628,7 @@ func (a *Api) UsersList(factory string) ([]FactoryUser, error) {
}

func (a *Api) UserAccessDetails(factory string, user_id string) (*FactoryUserAccessDetails, error) {
url := a.serverUrl + "/ota/factories/" + factory + "/users/" + user_id
url := a.serverUrl + "/ota/factories/" + factory + "/users/" + user_id + "/"
body, err := a.Get(url)
if err != nil {
return nil, err
Expand Down

0 comments on commit f82c551

Please sign in to comment.