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

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

Closed
ethernomad opened this issue May 4, 2018 · 3 comments · May be fixed by #11819
Closed

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

ethernomad opened this issue May 4, 2018 · 3 comments · May be fixed by #11819
Labels
F7-optimisation 💊 An enhancement to provide better overall performance in terms of time-to-completion for a task. M6-rpcapi 📣 RPC API. P5-sometimesoon 🌲 Issue is worth doing soon.
Milestone

Comments

@ethernomad
Copy link
Contributor

Parity/v1.9.7-stable-7919629-20180423/x86_64-linux-gnu/rustc1.25.0
connected to MIX Blockchain

Currently every RPC command is 2 requests from Firefox. First the OPTIONS pre-flight and then the actual request. By setting CORS Max-Age to 10 minutes the number of requests can be cut in half. For high latency connections to the node, this has significant performance improvements.

Geth had the exact same problem: ethereum/go-ethereum#3079
screenshot from 2018-05-04 14-33-09

@Tbaut
Copy link
Contributor

Tbaut commented May 4, 2018

Thanks! PR always welcome :)

@Tbaut Tbaut added F7-optimisation 💊 An enhancement to provide better overall performance in terms of time-to-completion for a task. P5-sometimesoon 🌲 Issue is worth doing soon. M6-rpcapi 📣 RPC API. labels May 4, 2018
@Tbaut Tbaut added this to the 1.12 milestone May 4, 2018
@tomusdrw
Copy link
Collaborator

tomusdrw commented May 4, 2018

Neat! Requires implementation in https://github.com/paritytech/jsonrpc

@debris
Copy link
Collaborator

debris commented Jul 7, 2019

implemented a long time ago in paritytech/jsonrpc#280

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
F7-optimisation 💊 An enhancement to provide better overall performance in terms of time-to-completion for a task. M6-rpcapi 📣 RPC API. P5-sometimesoon 🌲 Issue is worth doing soon.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants