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

Echo CORS request headers by default #10221

Merged
merged 2 commits into from
Jan 21, 2019

Conversation

cmichi
Copy link
Contributor

@cmichi cmichi commented Jan 21, 2019

This PR addresses #6616:

For maximum compatibility, Parity should echo back all the headers from Access-Control-Request-Headers in Access-Control-Allow-Headers.

I just noticed that this is already the default behavior of the jsonrpc with_meta_extractor(…): https://github.com/paritytech/jsonrpc/blob/parity-2.2/http/src/lib.rs#L240. I still think it's a good idea to merge this, since it makes the behavior more explicit and adds a test which would fail if the default behavior would ever change.

@cmichi cmichi requested a review from tomusdrw January 21, 2019 08:47
@cmichi cmichi added the A0-pleasereview 🤓 Pull request needs code review. label Jan 21, 2019
Copy link
Collaborator

@tomusdrw tomusdrw left a comment

Choose a reason for hiding this comment

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

lgtm

rpc/src/lib.rs Outdated Show resolved Hide resolved
@ascjones ascjones merged commit 940a88f into master Jan 21, 2019
@ascjones ascjones deleted the cmichi-echo-cors-request-headers-by-default branch January 21, 2019 10:30
@5chdn 5chdn added this to the 2.4 milestone Jan 21, 2019
@5chdn 5chdn added the M4-core ⛓ Core client code / Rust. label Jan 21, 2019
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. M4-core ⛓ Core client code / Rust.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants