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 and Terala-Priyanka committed Nov 10, 2023
1 parent c07da3f commit 7f9be8c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change history for ui-users

## [10.0.4](https://github.com/folio-org/ui-users/tree/v10.0.4) (2023-11-10)
[Full Changelog](https://github.com/folio-org/ui-users/compare/v10.0.3...v10.0.4)

* Correctly handle optional `X-Okapi-token` request header. Refs UIU-2977.

## [10.0.3](https://github.com/folio-org/ui-users/tree/v10.0.3) (2023-10-23)
[Full Changelog](https://github.com/folio-org/ui-users/compare/v10.0.1...v10.0.3)

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 7f9be8c

Please sign in to comment.