Skip to content

Commit

Permalink
refactors
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilianoSanchez committed Aug 16, 2024
1 parent 9d4153a commit 268d529
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
4 changes: 4 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
10.28.0 (August XXX, 2024)
- Updated @splitsoftware/splitio-commons package to version 1.17.0 that includes minor updates:
- Added `sync.requestOptions.getHeaderOverrides` configuration option to enhance SDK HTTP request Headers for Authorization Frameworks.

10.27.0 (June 25, 2024)
- Added `sync.requestOptions.agent` option to SDK configuration for NodeJS. This allows passing a custom NodeJS HTTP(S) Agent with specific configurations for the SDK requests, like custom TLS settings or a network proxy (See https://help.split.io/hc/en-us/articles/360020564931-Node-js-SDK#proxy).
- Updated some transitive dependencies for vulnerability fixes.
Expand Down
18 changes: 9 additions & 9 deletions types/splitio.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,11 @@ interface ISettings {
readonly sync: {
splitFilters: SplitIO.SplitFilter[],
impressionsMode: SplitIO.ImpressionsMode,
enabled: boolean
enabled: boolean,
flagSpecVersion: string,
requestOptions?: {
getHeaderOverrides?: (context: { headers: Record<string, string> }) => Record<string, string>
}
}
/**
* User consent status if using in browser. Undefined if using in NodeJS.
Expand Down Expand Up @@ -1135,14 +1139,12 @@ declare namespace SplitIO {
*/
requestOptions?: {
/**
* Custom function called before each request, allowing you to add or update custom headers on the SDK requests.
*
* @TODO pass context to `getHeaderOverrides`. Add `validUntil` property?
* Custom function called before each request, allowing you to add or update custom headers on the SDK HTTP requests.
*
* @property getHeaderOverrides
* @default undefined
*/
getHeaderOverrides?: () => Record<string, string>,
getHeaderOverrides?: (context: { headers: Record<string, string> }) => Record<string, string>
},
}
}
Expand Down Expand Up @@ -1195,14 +1197,12 @@ declare namespace SplitIO {
*/
requestOptions?: {
/**
* Custom function called before each request, allowing you to add or update custom headers on the SDK requests.
*
* @TODO pass context to `getHeaderOverrides`. Add `validUntil` property?
* Custom function called before each request, allowing you to add or update custom headers on the SDK HTTP requests.
*
* @property getHeaderOverrides
* @default undefined
*/
getHeaderOverrides?: () => Record<string, string>,
getHeaderOverrides?: (context: { headers: Record<string, string> }) => Record<string, string>
/**
* Custom NodeJS HTTP(S) Agent used by the SDK for HTTP(S) requests.
*
Expand Down

0 comments on commit 268d529

Please sign in to comment.