You end up pasting a confusing snippet found in the internet to make it work.
You end up pasting a confusing snippet found in the internet to make it work.
The proxy can rewrite app/suffix to /suffix so the back-end sees the the correct Location header.
But for a front-end it's not always that simple. Take a React application with HTML5-mode (where you can go from /foo to /bar without actually invoking a reques to the backend): Your React app needs to know what its base is. Otherwise the URLs just don't work, as it doesn't know which base to inject (or remove) as part of its navigation.
Combine that with the nginx's try_files and you have a recipe for infinite navigation to the index.html: https://nginx.org/en/docs/http/ngx_http_core_module.html#try...