-
Notifications
You must be signed in to change notification settings - Fork 928
Add GMPID Header to Firestore #3888
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
6d20b58
26584e3
60326a9
ff28db5
20b5598
02d6f43
9a2033a
c58a14b
2addf3d
d4d5615
9dd1d6d
3b923f9
d448d5b
0a4861e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -118,6 +118,7 @@ export abstract class RestConnection implements Connection { | |
token: Token | null | ||
): void { | ||
headers['X-Goog-Api-Client'] = X_GOOG_API_CLIENT_VALUE; | ||
headers['X-Firebase-GMPID'] = this.databaseInfo.appId; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: capitalization of the header name is different between this file and There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The goal was to match the surrounding code. Let me fix the GRPC headers. |
||
|
||
// Content-Type: text/plain will avoid preflight requests which might | ||
// mess with CORS and redirects by proxies. If we add custom headers | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: the plumbing accounts for the possibility of
appId
being empty. What do you think about not setting the header at all ifappId
is empty rather than setting an "empty" header?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked at the RTDB code and it uses an empty app ID and sends the header. I wanted to match that behavior.