How to add reverse proxy for production?
I'm currently using Tanstack start with tanstack query to fetch data from external api using axios.get("/api/images") which is running on localhost:9999.
Now in app.config.ts there is only option for devProxy /api -> localhost:9999 which is working fine in devlopment. When i switch production build and run that the proxy doen't seems to be working even if i set the reverse proxy in caddy.
Throw an error: ERR_INVALID_URL
Throw an error: ERR_INVALID_URL
2 Replies
extended-salmon•4mo ago
isnt this being caused by the container not being able to access the sv with localhost ip? can you make a curl to the server in that ip from inside docker?
i use nginx for the same and its working as expected, but im not running it in docker so im not sure if thats the problem
rare-sapphireOP•4mo ago
can you share the nginx config for that?
I'm running it through same network which i created externally and using the same external network for the service