Skip to content
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

chore: Add X-Goog-Api-Client metric header to outgoing authorized http requests #2763

Merged
merged 3 commits into from
Nov 7, 2024

Conversation

jonathanedey
Copy link
Contributor

Adds headers to all authorized http requests google backend endpoints.

Does not add headers to:

  • Firestore
  • Storage
  • RTDB (database.compact)

@jonathanedey jonathanedey added the release:stage Stage a release candidate label Nov 7, 2024
@jonathanedey jonathanedey marked this pull request as ready for review November 7, 2024 14:09
Copy link
Member

@lahirumaramba lahirumaramba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Left one comment

// necessary for use when utilizing human account with ADC (RSDF)
if (!requestCopy.headers['x-goog-user-project'] && this.app.options.projectId) {
requestCopy.headers['x-goog-user-project'] = this.app.options.projectId
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bug in the current SDK and it should only be set for ADC human accounts. I have a fix coming up here #2761

You can remove this part from this PR for now

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@jonathanedey jonathanedey merged commit dcef2ae into master Nov 7, 2024
8 checks passed
@jonathanedey jonathanedey deleted the je-headers branch November 7, 2024 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:stage Stage a release candidate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants