Skip to content

Commit

Permalink
UIU-2977 x-okapi-token header must always be optional (#2578)
Browse files Browse the repository at this point in the history
The `X-Okapi-Token` header is optional and should only be included when
a token value is present on the `stripes.okapi` object.

Refs UIU-2977
  • Loading branch information
zburke authored Oct 23, 2023
1 parent 7149368 commit b9ba0f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Change history for ui-users

## [10.1.0] IN PROGRESS

* Also support `feesfines` interface version `19.0`. Refs UIU-2960.
* Pass location.search parameter through history search. Refs UIU-2971.
* Pass `location.search` parameter through history search. Refs UIU-2971.
* Correctly handle optional `X-Okapi-token` request header. Refs UIU-2977.

## [10.0.1](https://github.com/folio-org/ui-users/tree/v10.0.1) (2023-10-18)
[Full Changelog](https://github.com/folio-org/ui-users/compare/v10.0.0...v10.0.1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ class PermissionsModal extends React.Component {
const permissions = await GET({
headers: {
[OKAPI_TENANT_HEADER]: tenantId || okapi.tenant,
[OKAPI_TOKEN_HEADER]: okapi.token,
...(okapi.token && { [OKAPI_TOKEN_HEADER]: okapi.token }),
}
});

Expand Down

0 comments on commit b9ba0f3

Please sign in to comment.