feat!: new implementation for the proxy middleware. (express-http-middleware)
This is an alternative implementation of #5299 which uses express-http-middleware. Compared to the other implementation, this one tries to implement the task ‘handle errors (not found, not authorised, ...) correctly’.
It is a PoC in which only the 404 error is implemented, and there is some code to correct (e.g. duplicate code).
Deploy Preview for plone-components canceled.
| Name | Link |
|---|---|
| Latest commit | 75510776866ebc4787b7de65325c2daff058d82e |
| Latest deploy log | https://app.netlify.com/sites/plone-components/deploys/66f2e7524c0d430008874854 |
Deploy Preview for plone-components canceled.
| Name | Link |
|---|---|
| Latest commit | ded7f873aa3e14ec4d76e65f520e3bcfc79fc364 |
| Latest deploy log | https://app.netlify.com/sites/plone-components/deploys/66f2e9339194d700088c4c90 |
@mamico Is the idea of the proxy to handle private content? I wonder if the request from anonymous users could not go directly to Plone.
@mamico Is the idea of the proxy to handle private content? I wonder if the request from anonymous users could not go directly to Plone.
@wesleybl Not really. The file/image proxy implementation has been there on Volto from the beggining, this fix and its twin #5299, where you can find more details, is intended to improve performance in terms of memory and response time.
On the other hand, regarding whether to use the Volto proxy or set route on the reverse proxy to point directly to Plone. The points: handling authentication (as you said), but also, for example, handling error pages, such as 404. In fact pointing from reverse proxy directly to Plone, without any specific intervention on reverse proxy or on Plone, when faced with a missing resource, you would have the 404 page from Plone. Which is not so good ...
Hi There! 👋
We haven't seen any activity on this pull request in a while :sleeping:, and we want to make sure that it's still relevant. Please let us know by:
- adding a comment about what needs to be done next 💬
- updating its status and other labels 🏷️
Otherwise close this pull request. 🧹
implented as an addon https://github.com/collective/volto-middleware-binary