Closed YusufMavzer closed 3 years ago
@KevinDockx Could you merge this in?
@YusufMavzer : first of all, thanks for the PR - I appreciate it. However, I'd prefer not to merge it as such - it will work, but by allowing overriding the Invoke method and making the next delegate protected instead of private the middleware is open to unknown manipulation from outside of the middleware itself. It's generally not a good idea to allow that.
That said, I do agree with you: allowing to bypass certain routes is certainly a useful feature. I just added it with this commit: https://github.com/KevinDockx/HttpCacheHeaders/commit/8154cc0b7febaf6ee7c8a043311736c14a71ad77 => you can now use the [HttpCacheIgnore] attribute at level of any controller or controller action to ignore the respective route(s). Hope this helps! :)
Hi,
Thanks for the new feature. This does solve our problem too :)
For our use case we need to bypass the caching for some endpoint.
Without over bloating the library it would nice to give us more flexibility to inherit from it.