getwax / bls-wallet

Core components to use layer 2 smart contract wallets with the BLS signature scheme
MIT License
177 stars 46 forks source link

Configure cors for geth dev #581

Closed voltrevo closed 1 year ago

voltrevo commented 1 year ago

What is this PR doing?

Today my brave decided to get upset about cors headers on the geth node.

I'm not sure why cors headers weren't required previously? Perhaps localhost is usually given an exemption but mid-way through my testing today brave decided to get strict about it.

Or maybe something changed in geth. Seems unlikely though since they've had this setting for enabling cors for a long time and it wasn't turned on.

Anyway, this adds the option so that geth dev will just allow cors, as it obviously should.

How can these changes be manually tested?

yarn start
curl -v -X OPTIONS -H 'Origin: example.com' http://localhost:8545

check that the response has this line:

...
< Access-Control-Allow-Origin: *
...

Does this PR resolve or contribute to any issues?

Nurp.

Checklist

Guidelines