Skip to content

Commit

Permalink
Reduce rpc client pre-flight requests by setting max-age header (#8082)
Browse files Browse the repository at this point in the history
automerge

(cherry picked from commit 69a6d07)
  • Loading branch information
jstarry authored and mergify-bot committed Feb 1, 2020
1 parent 8f8fb72 commit 78c3125
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/src/rpc_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ impl JsonRpcService {
.cors(DomainsValidation::AllowOnly(vec![
AccessControlAllowOrigin::Any,
]))
.cors_max_age(86400)
.request_middleware(RpcRequestMiddleware::new(ledger_path))
.start_http(&rpc_addr);
if let Err(e) = server {
Expand Down

0 comments on commit 78c3125

Please sign in to comment.