system
(system)
May 18, 2025, 7:01pm
1
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
system
(system)
May 19, 2025, 1:53am
2
Could you please provide your domain and the corresponding configuration details?
system
(system)
May 19, 2025, 2:58am
3
domain - http://app.surepass.io
path - /apidog/kyc
system
(system)
May 19, 2025, 2:59am
4
this is how I am making requests to Apidog and returning as response
system
(system)
May 19, 2025, 3:00am
5
works well. The links within Apidog HTML do respect this custom domain. However, do not respect the path
system
(system)
May 19, 2025, 3:15am
6
Additionally, I am transparently forwarding request headers received to Apidog. So that should automatically send Host
header as the custom domain
system
(system)
May 19, 2025, 3:17am
7
Let me also provide console.log of actual headers being sent to Apidog
system
(system)
May 19, 2025, 3:18am
8
if not, could be some misconfiguration from my end
system
(system)
May 19, 2025, 3:34am
9
So I fixed my code. I removed deleting host
header.
system
(system)
May 19, 2025, 3:36am
10
So these are the actual header I am sending to Apidog
system
(system)
May 19, 2025, 3:38am
11
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
system
(system)
May 19, 2025, 3:47am
12
I noticed that Surepass redirects to https://console.surepass.io . Are you sure you have configured proxy_pass correctly?
system
(system)
May 19, 2025, 3:55am
13
so console.surepass.io is just a frontend (our developer dashboard). We redirect user to console to provide auth before seeing our docs.
system
(system)
May 19, 2025, 3:55am
14
the actual custom domain I want to use it the API which console uses - app.surepass.io
system
(system)
May 19, 2025, 3:55am
15
I have also included x-forwarded-for headers similar to like Nginx would do. however doesnt works
system
(system)
May 19, 2025, 3:57am
16
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.
system
(system)
May 19, 2025, 3:57am
17
The domain is working fine. Its just that i am not able to mount it to custom path - /apidog/kyc/
system
(system)
May 19, 2025, 3:59am
19
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