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

Add CORS Max-Age header of 600 seconds #11819

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tbcd
Copy link

@tbcd tbcd commented Jul 14, 2020

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.

Copy link
Collaborator

@sorpaas sorpaas left a comment

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