Skip to content

Commit d96d94f

Browse files
committed
Revert "fix: CORS errors due to header changes (#342)"
This reverts commit 5c89532.
1 parent 8c4aaf7 commit d96d94f

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

flagsmith-core.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -829,6 +829,10 @@ const Flagsmith = class {
829829
options.headers['Flagsmith-Application-Version'] = this.applicationMetadata.version;
830830
}
831831

832+
if (SDK_VERSION) {
833+
options.headers['Flagsmith-SDK-user-agent'] = `flagsmith-js-sdk/${SDK_VERSION}`
834+
}
835+
832836
if (headers) {
833837
Object.assign(options.headers, headers);
834838
}

test/init.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ describe('Flagsmith.init', () => {
292292
headers: expect.objectContaining({
293293
'Flagsmith-Application-Name': 'Test App',
294294
'Flagsmith-Application-Version': '1.2.3',
295+
'Flagsmith-SDK-user-agent': `flagsmith-js-sdk/${SDK_VERSION}`,
295296
}),
296297
}),
297298
);

utils/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
// Auto-generated by write-version.js
2-
export const SDK_VERSION = "9.3.2";
2+
export const SDK_VERSION = "9.3.1";

0 commit comments

Comments
 (0)