Custom domain using cloudflare workers

Hi
As my domain is already over cloudflare, I am using cloudflare route to mount my apidog documentation to - app.mydomain.com/apidog/
I got it working by fowarding the Host header as my custom domain and X-Apidog-Docs-Site-ID.
What doesn’t works is that when i click on any folder/endpoint, I get 404. because request is made to app.mydomain.com rather than app.mydomain.com/apidog.

I also have set custom domain - custom path in apidog publish docs setting but still cant get it working

Could you please provide your domain and the corresponding configuration details?

domain - http://app.surepass.io
path - /apidog/kyc

this is how I am making requests to Apidog and returning as response

works well. The links within Apidog HTML do respect this custom domain. However, do not respect the path

Additionally, I am transparently forwarding request headers received to Apidog. So that should automatically send Host header as the custom domain

Let me also provide console.log of actual headers being sent to Apidog

if not, could be some misconfiguration from my end

So I fixed my code. I removed deleting host header.

So these are the actual header I am sending to Apidog

Although I am not sure, If fetch() would override the host header i am sending to mydocs.apidog.com. This is console log just before I make request

I noticed that Surepass redirects to https://console.surepass.io. Are you sure you have configured proxy_pass correctly?

so console.surepass.io is just a frontend (our developer dashboard). We redirect user to console to provide auth before seeing our docs.

the actual custom domain I want to use it the API which console uses - app.surepass.io

I have also included x-forwarded-for headers similar to like Nginx would do. however doesnt works

So actual path of Docs is - https://app.surepass.io/apidog/kyc/
If you were logged in to console. you would see someting like I shown in screenshot, rather than getting redirected.

The domain is working fine. Its just that i am not able to mount it to custom path - /apidog/kyc/

As Apidog doesnt have context of this /apidog/kyc/ the embedded links withihn the docs only use my custom domain - app.surepass.io without any path

thus the 404 error