Skip to content

Commit

Permalink
Fix options for RTDB on node (#6399)
Browse files Browse the repository at this point in the history
* Don't shadow options

* Add changeset
  • Loading branch information
jsdt authored Jul 7, 2022
1 parent 1261d83 commit 6a8be13
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/stale-pianos-buy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@firebase/database': patch
---

Fix setting of headers on Node.
2 changes: 1 addition & 1 deletion packages/database/src/realtime/WebSocketConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export class WebSocketConnection implements Transport {
if (isNodeSdk()) {
const device = this.nodeAdmin ? 'AdminNode' : 'Node';
// UA Format: Firebase/<wire_protocol>/<sdk_version>/<platform>/<device>
const options: { [k: string]: object } = {
options = {
headers: {
'User-Agent': `Firebase/${PROTOCOL_VERSION}/${SDK_VERSION}/${process.platform}/${device}`,
'X-Firebase-GMPID': this.applicationId || ''
Expand Down

0 comments on commit 6a8be13

Please sign in to comment.