This is not an issue we face in production but in development using www.lvh.me which resolves to 127.0.0.1 I am using Docker Desktop for Mac.
To simplify the issue, we have 2 pods.
- Web application exposed via ingress with a self signed cert and accessible via https://www.lvh.me
- Background job which fetches a URL (https://www.lvh.me/report/xyz) from the main web application to convert it in to a PDF
Because www.lvh.me resolves to 127.0.0.1, I think it fails to fetch the URL. But the URL in question works fine when accessed from the desktop.
What would be the right setup for local development that needs a background job to access the main application URL?