Skip to content

Commit 5db1cb3

Browse files
rc
1 parent eb448bf commit 5db1cb3

File tree

5 files changed

+48
-21
lines changed

5 files changed

+48
-21
lines changed

CHANGES.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
10.28.0 (September XXX, 2024)
1+
10.28.0 (September 6, 2024)
22
- Updated @splitsoftware/splitio-commons package to version 1.17.0 that includes minor updates:
33
- Added `sync.requestOptions.getHeaderOverrides` configuration option to enhance SDK HTTP request Headers for Authorization Frameworks.
44
- Updated some transitive dependencies for vulnerability fixes.

package-lock.json

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@splitsoftware/splitio",
3-
"version": "10.28.0-rc.4",
3+
"version": "10.28.0-rc.5",
44
"description": "Split SDK",
55
"files": [
66
"README.md",
@@ -40,7 +40,7 @@
4040
"node": ">=6"
4141
},
4242
"dependencies": {
43-
"@splitsoftware/splitio-commons": "1.17.0-rc.4",
43+
"@splitsoftware/splitio-commons": "1.17.0-rc.5",
4444
"@types/google.analytics": "0.0.40",
4545
"@types/ioredis": "^4.28.0",
4646
"bloom-filters": "^3.0.0",

src/settings/defaults/version.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const packageVersion = '10.28.0-rc.4';
1+
export const packageVersion = '10.28.0-rc.5';

types/splitio.d.ts

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,13 +1138,28 @@ declare namespace SplitIO {
11381138
*/
11391139
requestOptions?: {
11401140
/**
1141-
* Custom function called before each request, allowing you to add or update custom headers on the SDK HTTP requests.
1142-
* Some headers are required by the SDK, like 'SplitSDKVersion', and cannot be overridden.
1143-
* To pass multiple headers with the same name, you can combine them into a single line separated by commas.
1144-
* Example: `{ 'Authorization': 'value1, value2' }`.
1141+
* Custom function called before each request, allowing you to add or update headers in SDK HTTP requests.
1142+
* Some headers, such as `SplitSDKVersion`, are required by the SDK and cannot be overridden.
1143+
* To pass multiple headers with the same name, combine their values into a single line, separated by commas. Example: `{ 'Authorization': 'value1, value2' }`
1144+
* Or provide keys with different case since headers are case-insensitive. Example: `{ 'authorization': 'value1', 'Authorization': 'value2' }`
1145+
*
1146+
* NOTE: to pass custom headers to the streaming connection in Browser, you should polyfill the `window.EventSource` object with a library that supports headers,
1147+
* like https://www.npmjs.com/package/eventsource, since the native EventSource object does not support them in general and will be ignored.
11451148
*
11461149
* @property getHeaderOverrides
11471150
* @default undefined
1151+
*
1152+
* @param context - The context for the request.
1153+
* @param context.headers - The current headers in the request.
1154+
* @returns A set of headers to be merged with the current headers.
1155+
*
1156+
* @example
1157+
* const getHeaderOverrides = (context) => {
1158+
* return {
1159+
* 'Authorization': context.headers['Authorization'] + ', other-value',
1160+
* 'custom-header': 'custom-value'
1161+
* };
1162+
* };
11481163
*/
11491164
getHeaderOverrides?: (context: { headers: Record<string, string> }) => Record<string, string>
11501165
},
@@ -1199,13 +1214,25 @@ declare namespace SplitIO {
11991214
*/
12001215
requestOptions?: {
12011216
/**
1202-
* Custom function called before each request, allowing you to add or update custom headers on the SDK HTTP requests.
1203-
* Some headers are required by the SDK, like 'SplitSDKVersion', and cannot be overridden.
1204-
* To pass multiple headers with the same name, you can combine them into a single line separated by commas.
1205-
* Example: `{ 'Authorization': 'value1, value2' }`.
1217+
* Custom function called before each request, allowing you to add or update headers in SDK HTTP requests.
1218+
* Some headers, such as `SplitSDKVersion`, are required by the SDK and cannot be overridden.
1219+
* To pass multiple headers with the same name, combine their values into a single line, separated by commas. Example: `{ 'Authorization': 'value1, value2' }`
1220+
* Or provide keys with different case since headers are case-insensitive. Example: `{ 'authorization': 'value1', 'Authorization': 'value2' }`
12061221
*
12071222
* @property getHeaderOverrides
12081223
* @default undefined
1224+
*
1225+
* @param context - The context for the request.
1226+
* @param context.headers - The current headers in the request.
1227+
* @returns A set of headers to be merged with the current headers.
1228+
*
1229+
* @example
1230+
* const getHeaderOverrides = (context) => {
1231+
* return {
1232+
* 'Authorization': context.headers['Authorization'] + ', other-value',
1233+
* 'custom-header': 'custom-value'
1234+
* };
1235+
* };
12091236
*/
12101237
getHeaderOverrides?: (context: { headers: Record<string, string> }) => Record<string, string>
12111238
/**

0 commit comments

Comments
 (0)