mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2025-12-11 02:09:53 -06:00
Pass HTTP credentials through to the API server when appropriate CORS headers are set
This commit is contained in:
parent
c1bbeeb6ac
commit
d1d6a6b373
@ -16,6 +16,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
* Update to `@shlinkio/shlink-js-sdk` 2.0.0
|
||||
* Add `eslint-plugin-react-compiler`
|
||||
* Run unit tests in a headless browser using vitest browser mode and playwright.
|
||||
* Existing HTTP credentials (cookies, TLS certs, authentication headers) are now automatically forwarded to the API server if appropriate [CORS headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Access-Control-Allow-Credentials) are set
|
||||
|
||||
### Deprecated
|
||||
* *Nothing*
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
"@reduxjs/toolkit": "^2.6.1",
|
||||
"@shlinkio/data-manipulation": "^1.0.3",
|
||||
"@shlinkio/shlink-frontend-kit": "^0.8.10",
|
||||
"@shlinkio/shlink-js-sdk": "^2.0.0",
|
||||
"@shlinkio/shlink-js-sdk": "^2.0.1",
|
||||
"@shlinkio/shlink-web-component": "^0.13.2",
|
||||
"bootstrap": "5.2.3",
|
||||
"bottlejs": "^2.0.1",
|
||||
|
||||
@ -23,7 +23,7 @@ export const buildShlinkApiClient = (httpClient: HttpClient) => (getStateOrSelec
|
||||
: getStateOrSelectedServer;
|
||||
const serverKey = `${apiKey}_${baseUrl}`;
|
||||
|
||||
const apiClient = apiClients[serverKey] ?? new ShlinkApiClient(httpClient, { apiKey, baseUrl });
|
||||
const apiClient = apiClients[serverKey] ?? new ShlinkApiClient(httpClient, { apiKey, baseUrl }, { credentials: 'include' });
|
||||
apiClients[serverKey] = apiClient;
|
||||
|
||||
return apiClient;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user