Skip to content

Commit

Permalink
FDC: Modified user agent to use language instead of platform (#8565)
Browse files Browse the repository at this point in the history
  • Loading branch information
maneesht authored Oct 14, 2024
1 parent 64db192 commit 813b9fa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/tall-birds-protect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@firebase/data-connect": patch
---

- Modified user agent to use language instead of platform
2 changes: 1 addition & 1 deletion packages/data-connect/src/network/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function initializeFetch(fetchImpl: typeof fetch): void {
function getGoogApiClientValue(_isUsingGen: boolean): string {
let str = 'gl-js/ fire/' + SDK_VERSION;
if (_isUsingGen) {
str += ' web/gen';
str += ' js/gen';
}
return str;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/data-connect/test/unit/userAgent.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ describe('User Agent Tests', () => {
'https://firebasedataconnect.googleapis.com/v1beta/projects/p/locations/l/services/s/connectors/c:executeQuery',
{
headers: {
['X-Goog-Api-Client']: 'gl-js/ fire/' + SDK_VERSION + ' web/gen'
['X-Goog-Api-Client']: 'gl-js/ fire/' + SDK_VERSION + ' js/gen'
}
}
);
Expand Down

0 comments on commit 813b9fa

Please sign in to comment.