3 ms·
Regarding that last point, that's often done with the X-Accel-Redirect header; backend can decide which file to serve, responds with the path to that file as th
by francislavoie 4y ago
Regarding that last point, that's often done with the X-Accel-Redirect header; backend can decide which file to serve, responds with the path to that file as that header, then the webserver can serve that file if that response header is there. Caddy can do this btw, with response handlers in the reverse_proxy directive. This pattern can be used to serve uploaded files stored in a non-public location, after the backend authenticated the request etc.
- KronisLV 4y ago> This pattern can be used to serve uploaded files stored in a non-public location, after the backend authenticated the request etc. That's a perfectly valid use case! Packaging a front end application (e.g. React/Angular/Vue) inside of a .jar file and making Tomcat or something else serve it, as a part of a larger Java application, though? Perhaps less of an optimal solution than just using Apache/Nginx/Caddy for it, outside of really wanting to be able to deploy everything as a single package.