I’m trying to setup Caddy as a reverse proxy to my apidog docs. Here is the Caddyfile block. However, when I visit the site https://walletapi.hypercore.one the site never loads.
walletapi.hypercore.one {
# Handle /swagger path
reverse_proxy /swagger/* https://localhost:5001{
transport http {
tls_insecure_skip_verify
}
}
# Handle /api path
reverse_proxy /api/* https://localhost:5001 {
transport http {
tls_insecure_skip_verify
}
}
# Default handler for all other requests (root path /)
reverse_proxy / http://493834.apidog.io {
header_up X-Apidog-Project-ID 493834
}
}
when I curl https://walletapi.hypercore.one -k I do see the message
<noscript>Sorry, we need js to run correctly!</noscript>
Also when I try to visit http://493834.apidog.io I get the message “This document does not exist or has been deleted”. Im confident the Proejct-ID is correct however.
I can access the url successfully. However, I observed that my browser automatically redirected http to https. Does it work if you use https instead of http to access?
Thank you for the feedback. Please follow the steps below to modify the configuration and see if the issue can be resolved:
Firstly, Refer to the configuration in the help document at Custom domain - Apidog Docs, change the “https” in the reverse_proxy configuration to “http”.
Secondly, Remove the header_up Host configuration.