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

client - Add functionality to specify cors for rpc server #1762

Merged
merged 3 commits into from
Mar 3, 2022

Conversation

g11tech
Copy link
Contributor

@g11tech g11tech commented Mar 3, 2022

Motivation: While making getProof requests from the browser using web3, the requests were being rejected because of the enforced cors policy by the browser for the webpage.

This PR adds the ability to provide a cors string to the rpc api, * by default (i.e. no restrictions). Post this the browser was able to make the required requests to ethereumjs rpc server.

@codecov
Copy link

codecov bot commented Mar 3, 2022

Codecov Report

Merging #1762 (2f1014c) into master (f96c9ec) will increase coverage by 0.00%.
The diff coverage is 66.66%.

Impacted file tree graph

Flag Coverage Δ
block 85.57% <ø> (ø)
blockchain 83.28% <ø> (ø)
client 75.23% <66.66%> (-0.02%) ⬇️
common 93.90% <ø> (ø)
devp2p 82.63% <ø> (+0.06%) ⬆️
ethash 90.76% <ø> (ø)
trie 86.18% <ø> (ø)
tx 89.94% <ø> (ø)
util 92.62% <ø> (ø)
vm 81.19% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Copy link
Contributor

@ryanio ryanio left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

@ryanio ryanio merged commit da0c698 into ethereumjs:master Mar 3, 2022
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.

3 participants