Skip to content

Conversation

@pinarol
Copy link
Contributor

@pinarol pinarol commented May 27, 2025

Closes #

Description

Currently we don't add headers in case a custom URLSession is injected. We might be missing some usage analytics because of that. This PR proposes to change the point we add these headers so they are not overridden/lost.

Testing Steps

Use a sniffer tool to check that the headers are added both for upload and other operations.

To prevent them to be overridden by a custom URLSession
@pinarol pinarol requested a review from etoledom May 27, 2025 12:55
@pinarol pinarol self-assigned this May 27, 2025
@wpmobilebot
Copy link

App Icon📲 You can test the changes from this Pull Request in Gravatar Prototype Build by scanning the QR code below to install the corresponding build.
App NameGravatar Prototype Build
Build Number2378
VersionPR #764
Bundle IDcom.automattic.gravatar-sdk-demo-uikit.prototype-build
Commit7a1fc7c
Installation URL51q9abgqhvb40
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

Copy link
Contributor

@etoledom etoledom left a comment

Choose a reason for hiding this comment

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

Tested a custom URLSession passed to the Profile service:

  • On trunk it won't add the x- headers
  • With these changes, they are added

:shipit: 🙏

@pinarol pinarol merged commit 5dc4738 into trunk May 27, 2025
10 checks passed
@pinarol pinarol deleted the wppinar/move-headers branch May 27, 2025 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants