Skip to content
This repository was archived by the owner on Nov 6, 2020. It is now read-only.

Add CORS Max-Age header of 600 seconds - #11819

Open
tbcd wants to merge 1 commit into
openethereum:masterfrom
tbcd:tbcd-8542-add-cors-max-age
Open

Add CORS Max-Age header of 600 seconds#11819
tbcd wants to merge 1 commit into
openethereum:masterfrom
tbcd:tbcd-8542-add-cors-max-age

Conversation

@tbcd

@tbcd tbcd commented Jul 14, 2020

Copy link
Copy Markdown

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 paritytech/jsonrpc#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.

@sorpaas sorpaas left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM.

@sorpaas sorpaas added A0-pleasereview 🤓 Pull request needs code review. M6-rpcapi 📣 RPC API. labels Jul 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

A0-pleasereview 🤓 Pull request needs code review. M6-rpcapi 📣 RPC API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CORS Max-Age is not set resulting in 2 requests for each command on Firefox

2 participants