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
|
* Update to `@shlinkio/shlink-js-sdk` 2.0.0
|
||||||
* Add `eslint-plugin-react-compiler`
|
* Add `eslint-plugin-react-compiler`
|
||||||
* Run unit tests in a headless browser using vitest browser mode and playwright.
|
* 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
|
### Deprecated
|
||||||
* *Nothing*
|
* *Nothing*
|
||||||
|
|||||||
@ -30,7 +30,7 @@
|
|||||||
"@reduxjs/toolkit": "^2.6.1",
|
"@reduxjs/toolkit": "^2.6.1",
|
||||||
"@shlinkio/data-manipulation": "^1.0.3",
|
"@shlinkio/data-manipulation": "^1.0.3",
|
||||||
"@shlinkio/shlink-frontend-kit": "^0.8.10",
|
"@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",
|
"@shlinkio/shlink-web-component": "^0.13.2",
|
||||||
"bootstrap": "5.2.3",
|
"bootstrap": "5.2.3",
|
||||||
"bottlejs": "^2.0.1",
|
"bottlejs": "^2.0.1",
|
||||||
|
|||||||
@ -23,7 +23,7 @@ export const buildShlinkApiClient = (httpClient: HttpClient) => (getStateOrSelec
|
|||||||
: getStateOrSelectedServer;
|
: getStateOrSelectedServer;
|
||||||
const serverKey = `${apiKey}_${baseUrl}`;
|
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;
|
apiClients[serverKey] = apiClient;
|
||||||
|
|
||||||
return apiClient;
|
return apiClient;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user