2 ms·
The largest issue with reverse proxies I've seen is that apps don't always offer a configuration to tell the front-end where they are hosted. The proxy can rew
by OptionOfT 2y ago
The largest issue with reverse proxies I've seen is that apps don't always offer a configuration to tell the front-end where they are hosted.
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_files https://nginx.org/en/docs/http/ngx_http_core_module.html#try...