Reverse proxy to third party origin / CF Spectrum

We are currently using cloudfront to reverse proxy/cache data which are not under our control. However, this does not work for all sites. We guess it is related to headers send by cloudfront. In this case we always get a redirect to to the real origin. Would this issue be the same with Cloudflare?
Spectrum can also proxy tcp and udp traffic. Would this be a workaround?

I suspect you’ll get the same thing with Cloudflare, although it really depends on the service that you are pointing to and what exactly is happening under the hood. There are a few possible things that could be happening, but my guess is that when you reverse proxy to another site, that site notices the Host header doesn’t match and redirects you to an appropriate place – If this is the case, you’ll have the same with Cloudflare (regular or Spectrum).

You might be able to work around the issue by creating a worker that would act as a reverse proxy, this could generate requests that look like normal HTTP(s) requests, but I would make very sure that the service actually allows you to do this.

Thx. I’m not sure how Spectrum works under the hood. I would have suspected it works similar as nginx udp/tcp stream option or maybe uses nginx itself. In that way I think headers should not be involved since everything happens on layer 4.