понедельник, 2 мая 2022 г. в 17:19:05 UTC+3, Teppo Kurki:
Why would the file not be there and what should happen if it is not, as there is nothing on the client side you can do about it?
In the client side - nothing, of course. But in the server plugin I could download the file from the internet and return it.
Yes, that's how the cache-proxy works.
Am I right in thinking that it should be something like this?:
```
function registerWithRouter(router){
router.use(function (req, res, next) {
//
next()
});
router.get('/*', function (req, res, next) {
//
})
};
```
This is better than using Express directly, as your plugin stuff gets mounted under a plugin specific prefix.
And `router.use` is not embedded in all routes at all, like `app.use`, right?