Reduce rpc client pre-flight requests by setting max-age header (#8082)
automerge
This commit is contained in:
		@@ -131,6 +131,7 @@ impl JsonRpcService {
 | 
				
			|||||||
                        .cors(DomainsValidation::AllowOnly(vec![
 | 
					                        .cors(DomainsValidation::AllowOnly(vec![
 | 
				
			||||||
                            AccessControlAllowOrigin::Any,
 | 
					                            AccessControlAllowOrigin::Any,
 | 
				
			||||||
                        ]))
 | 
					                        ]))
 | 
				
			||||||
 | 
					                        .cors_max_age(86400)
 | 
				
			||||||
                        .request_middleware(RpcRequestMiddleware::new(ledger_path))
 | 
					                        .request_middleware(RpcRequestMiddleware::new(ledger_path))
 | 
				
			||||||
                        .start_http(&rpc_addr);
 | 
					                        .start_http(&rpc_addr);
 | 
				
			||||||
                if let Err(e) = server {
 | 
					                if let Err(e) = server {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user