A client of mine installed n8n on his local windows computer (via Docker desktop) with a reverse proxy (he tried caddy as well as traefik, for traefik he used the docker-compose file as mentioned in the n8n docs here).
When I trigger the webhook url of a workflow in his n8n instance via reqbin.com, everything works fine. However, when I try to trigger the same url inside a postgres function, I receive the error
Error occurred: Failed to connect to n8n.[client's TLD].com port 443: Connection timed out
In general, the postgres function has no problems to query urls. Before trying to shift to the local n8n instance of my client, I was running a n8n instance on DigitalOcean - the postgres function queried the n8n webhook url of that n8n instance on DigitalOcean without any issues. So I assume that the root cause is on the reverse proxy side of the local instance. However, when the postgres function queries the n8n webhook url, there is nothing showing up in the logs - neither in the reverse proxy logs (nginx), nor in the n8n logs.
Have you tried using the N8N_PROXY_HOPS environment variable? It specifies the number of reverse proxies n8n is running behind, as detailed in the documentation. Adjusting this setting might resolve issues with webhook URL generation if your network setup differs from the default configuration.