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

Pass origin HTTP header on requests to Infura #4739

Closed
bdresser opened this issue Jul 5, 2018 · 6 comments
Closed

Pass origin HTTP header on requests to Infura #4739

bdresser opened this issue Jul 5, 2018 · 6 comments

Comments

@bdresser
Copy link
Contributor

bdresser commented Jul 5, 2018

Adding a MetaMask-specific header to Infura requests will let us segment our traffic and understand more about daily usage.

This header used to exist but was pulled because it caused issues with custom RPC options. We should only include the header when we're certain the request is headed to Infura. See #2250 and maybe #2138.

Prior implementation used x-metamask-origin – we should check with Infura team to see if this is suitable, or the simple origin header will do, or if there's something else they prefer

@bdresser
Copy link
Contributor Author

relates to #4279

@bdresser
Copy link
Contributor Author

@danfinlay @kumavis any concerns with using x-metamask-origin and passing through the dapp that initiated the transaction? This should let us see total numbers from MetaMask as well as generate a list of dapps folks are using (beyond what Infura is able to look up by contract)

@bdresser bdresser modified the milestones: Sprint 08 [7.23 - 8.3], Sprint 09 [8.6 - 8.17] Aug 6, 2018
@danfinlay
Copy link
Contributor

I think that's fine, I believe that's what we used previously. I would want @kumavis to chime in on whether this is going to trigger a preflight.

@bdresser bdresser modified the milestones: Sprint 09 [8.6 - 8.17], Sprint 10 [8.20 - 8.31] Aug 20, 2018
@whymarrh
Copy link
Contributor

As an FYI, the X- prefix for custom headers is deprecated (RFC 6648) so if possible we might want to talk to Infura about their desired custom header (e.g. maybe a Infrua-Source: MetaMask/<dapp name> or something).

@bdresser bdresser removed this from the Sprint 10 [8.20 - 8.31] milestone Nov 26, 2018
@whymarrh
Copy link
Contributor

Did we hear back from Infura about which header they'd like us to implement?

@jennypollack jennypollack self-assigned this Jan 4, 2019
@ghost ghost added the in progress label Jan 15, 2019
@bdresser
Copy link
Contributor Author

implemented in #6023

@ghost ghost removed the in progress label Feb 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants