🌏 Trying to reverse proxy to my documentation using Cloudflare routes and workers

I am trying to host documentation for my app on a path rather than on my subdomain. I thought I could accomplish this with cloudflare as follows:

In short, I want to use a worker to display my documentation site whenever a client goes to mydomain.io/docs* but goes to my main bubble application hosted at mydomain.io for all other requests.

Sadly, I can’t get this to work.

Things that do work:

  • My bubble app is being proxied through cloudlfare
  • The worker script runs as expected when invoked from its workers.dev url
  • mydomain.io loads perfectly fine

However, when I visit mydomain.io/docs*, I get my bubble’s apps 404 page instead of triggering my worker.

Can anyone tell me why this is happening? Is there a configuration step I am missing to trigger the worker from mydomain.io/docs*? Or is there an issue on Bubble’s side that is prohibiting this?

Haven’t tried it, or have experience with it, but here was a fun read on how this person setup something similar for ghost blog.

1 Like

Will take a look, thanks!

This topic was automatically closed after 14 days. New replies are no longer allowed.