Forwarding Headers
Learn how to forward headers to your RPCs via the Ironforge Load Balancer
If you wish to send certain headers to your RPCs, you can do so by adding them to your requests to the Ironforge Load Balancer as headers in the format, X-Ironforge-Proxy-<header-name>
.
For example, if you want to send a X-Forwarded-For
header to your RPC, you can send a X-Ironforge-Proxy-X-Forwarded-For
header in your request.
const response = await fetch('https://rpc.ironforge.network/mainnet?apiKey=<api_key>', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-Ironforge-Proxy-X-Forwarded-For': '203.0.113.195'
},
body: JSON.stringify({
jsonrpc: '2.0',
id: 1,
method: 'getAccountInfo',
params: ['5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY']
})
});
const data = await response.json();
return data;