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

Add source header #6

Merged
merged 3 commits into from
Jan 17, 2019
Merged

Add source header #6

merged 3 commits into from
Jan 17, 2019

Conversation

jennypollack
Copy link
Contributor

No description provided.

Copy link

@danfinlay danfinlay left a comment

Choose a reason for hiding this comment

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

I have one outstanding question that I don't feel qualified to answer without some extra research, before merging.

@@ -110,11 +113,15 @@ function fetchConfigFromReq({ network, req }) {
fetchParams.method = 'POST'
fetchParams.headers = {
'Accept': 'application/json',
'Content-Type': 'application/json'
'Content-Type': 'application/json',
[source]: requestOrigin

Choose a reason for hiding this comment

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

I guess my big question about adding a new header: Does this cause a pre-flight, doubling our load on Infura? I'm not a header pre-flight expert, that would really be my top question for @kumavis.

Copy link

@brunobar79 brunobar79 Jan 17, 2019

Choose a reason for hiding this comment

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

@jennypollack @danfinlay if you inspect the network requests on the BG and you see a bunch of OPTIONS requests right before the POST then the answer is yes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

just spent some time clocking network activity between my branch and the current release (5.3.1) for mainnet and rinkeby and the numbers don't lead me to believe that there is a pre-flight. i'm also not seeing any OPTIONS requests before the POST as @brunobar79 mentioned

Copy link

@danfinlay danfinlay left a comment

Choose a reason for hiding this comment

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

Addressed my concern, looks good!

@jennypollack jennypollack merged commit 01cbbd8 into master Jan 17, 2019
@jennypollack jennypollack deleted the add-source-header branch January 22, 2019 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants