feat: 🎸 add failover header to Infura

This commit is contained in:
futantan 2024-03-05 09:11:13 +08:00
parent ad5f1c5fc7
commit d2e8f2d439

View File

@ -199,6 +199,7 @@ export class InfuraProvider extends JsonRpcProvider implements CommunityResourca
const request = new FetchRequest(`https:/\/${ getHost(network.name) }/v3/${ projectId }`);
request.allowGzip = true;
request.setHeader('Enable-Failover', 'true');
if (projectSecret) { request.setCredentials("", projectSecret); }
if (projectId === defaultProjectId) {