Fetch through proxy


#1

Is it possible to get data from remote URL through proxy? It seams Fetch API doesn’t support it. Eg. Fetch coinbase through proxy in the following example: https://developers.cloudflare.com/workers/recipes/aggregating-multiple-requests/


#2

Hi @jiri, I’m not sure I understand. Could you clarify the question?

If you mean: can you direct a fetch request to a backend server with a Host header that does not match that backend server, you may find the resolve override feature (enterprise only, I believe) useful:


#3

Hi,

from the docs it’s not clear for me. Does the Resolve Override (in enterprise ‘mode’) work as connection through proxy? Something like:
curl -x 192.168.0.1:8080 http:/example.com/


#4

Hi @jiri, I understand what you mean now. Unfortunately, we do not have equivalent functionality. Please disregard my mention of resolve override.

If you tell me more about your use case, I may be able to come up with other suggestions.

Harris


#5

Sometimes I need to access/fetch data from specific IP (eq IP of my proxies), otherwise these data are not accessible. I think now it’s not possible to make it through the Worker.