Worker keep same Ip

I am playing with workers however one task i am trying to do involves making 2 external requests and i notice that while both tasks happen in the same script, each request happens on a new ip address.


    const [btcResp, ethResp, ltcResp] = await Promise.all([
          fetch('', init),
          fetch('', init),
          fetch('', init)

 return new Response(btc.ip+' - '+eth.ip+' - '+ltc.ip, responseInit)

would result in: - -

Is there any way i can keep the same ip address at least for that session from a worker?

1 Like

Which worker that will run the script cannot be controlled, however, if you want to white-list Worker IP’s you can always find an up-to-date list of IP’s here:

This is also a use case for me – I’m using an external API that generates a download link that is locked to the IP that requests the link. So I just need to do two back-to-back fetch() requests from the same IP. Note that the IP does not have to be consistent across invocations.