Reduce rpc client pre-flight requests by setting max-age header (#8082)

automerge
This commit is contained in:
Justin Starry 2020-02-01 20:10:26 +08:00 committed by GitHub
parent fab8ef379f
commit 69a6d07371
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -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 {