I’m hosting a Springboot app with a React frontend on a windows server by running the jar on it. The apps DNS gets resolved to “app.local“. This works fine in my company’s local network. The App and api share the same url so every time a request gets send it goes to “app.local/api/...”.
To use the App outside our local network a proxy was installed which forwards “app.msappproxy.net” into our local web server. The app is reachable trough the proxy. The problem is request to the api still get send to “app.local/api/…” instead of “app.msappproxy.net/api/…” and therefor doesn’t get resolved because this domain doesn’t exist outside of the local network.
I wasn’t part of creating the configs for this app and don’t have a deep knowledge of this but I believe there is probably an easy react or spring boot config to tell the app to use it’s domain or proxy. Sadly I’m not able to find something about this online until know.
I only found https://create-react-app.dev/docs/proxying-api-requests-in-development/ but I’m not sure if this applies for my use case. As its only mentioning development and one proxy. I want to be able to use the proxy address outside of the network and the normal address inside of the network. Any help is welcomed, thanks!