You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGES.txt
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,5 @@
1
-
1.17.0 (September XX, 2024)
1
+
1.17.0 (September 6, 2024)
2
+
- Added `sync.requestOptions.getHeaderOverrides` configuration option to enhance SDK HTTP request Headers for Authorization Frameworks.
2
3
- Added `isTimedout` and `lastUpdate` properties to IStatusInterface to keep track of the timestamp of the last SDK event, used on React and Redux SDKs.
3
4
- Updated some transitive dependencies for vulnerability fixes.
expect(instance.connection.url).toBe(EXPECTED_URL);// URL is properly set for streaming connection
122
-
expect(instance.connection.__eventSourceInitDict).toEqual({headers: EXPECTED_HEADERS});// Headers are properly set for streaming connection
123
-
});
132
+
expect(instance.connection.__eventSourceInitDict).toEqual({headers: EXPECTED_HEADERS,withCredentials: true});// Headers and options are properly set for streaming connection
124
133
125
-
test('SSClient / open method: URL, metadata headers and options',()=>{
expect(instance.connection.url).toBe(EXPECTED_URL);// URL is properly set for streaming connection
132
-
expect(instance.connection.__eventSourceInitDict).toEqual({headers: EXPECTED_HEADERS,withCredentials: true});// Headers and options are properly set for streaming connection
133
-
134
-
// Assert that getEventSource and getOptions were called once with settings
// if eventSource is not available, throw an exception
57
55
if(!this.eventSource)thrownewError('EventSource API is not available.');
58
56
59
-
this.streamingUrl=settings.urls.streaming+'/sse';
60
-
// @TODO get `useHeaders` flag from `getEventSource`, to use EventSource headers on client-side SDKs when possible.
61
-
this.useHeaders=useHeaders;
62
57
this.headers=buildSSEHeaders(settings);
63
58
this.options=getOptions&&getOptions(settings);
64
59
}
@@ -82,14 +77,16 @@ export class SSEClient implements ISSEClient {
82
77
returnencodeURIComponent(params+channel);
83
78
}
84
79
).join(',');
85
-
consturl=`${this.streamingUrl}?channels=${channelsQueryParam}&accessToken=${authToken.token}&v=${ABLY_API_VERSION}&heartbeats=true`;// same results using `&heartbeats=false`
80
+
consturl=`${this.settings.urls.streaming}/sse?channels=${channelsQueryParam}&accessToken=${authToken.token}&v=${ABLY_API_VERSION}&heartbeats=true`;// same results using `&heartbeats=false`
81
+
// use headers in server-side or if getHeaderOverrides is defined
0 commit comments