Mirror requests via Workers
If I follow the guide in this link: https://posthog.com/docs/advanced/proxy/cloudflare
May I know if the requests will be redirected or mirrored?
Using Cloudflare as a reverse proxy - Docs - PostHog
To use Cloudflare for reverse proxying, make sure that you're logged into your Cloudflare account, and that you've added your domain (called "website…
4 Replies
The requests are not redirected, they're just being proxied/ "mirrored" to Posthog through a Worker
@Chaika I tested their code. When I request to Server A, Server B responded. Ideally I want both servers to respond. Any idea how I can modify the code?
What exactly are you trying to do?
This proxies requests to PostHog, like on a subdomain
tracking
. For example, for static asset requests/js. It doesn't make sense to have two servers respond with assets, how would you return them both?@Chaika I have a situation whereby whenever I send a request from Server A to C, C will only respond to B. I don't own Server C and for some reasons that's the way they configure their response.
Therefore I need Worker to forward the response to Server A and B when either of them request to Server C.