openethereum / parity-ethereum

The fast, light, and robust client for Ethereum-like networks.
Other
6.83k stars 1.68k forks source link

Add CORS Max-Age header of 600 seconds #11819

Open tbcd opened 4 years ago

tbcd commented 4 years ago

This PR adds a CORS Access-Control-Max-Age of 600 seconds to RPC pre-flight OPTIONS responses.

Original issue #8542 was closed a year later as being implemented in https://github.com/paritytech/jsonrpc/pull/280, but that was (and still is) disabled by default, so this was never actually resolved.

The value of 600 seconds matches Geth's implementation.

Fixes #8542.