You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Was trying to use this module to apply different default cache control settings on two Express routers mounted on an app, and it seem this use case is not supported (perhaps because of (odd?) way that the modules exposes a function the returns a named function?)
Figured I would open an issue, as it would be unexpected behavior IMO middleware to not work on a router.
I also think it would be extremely helpful to include information on how to properly require the module in your documentation. I saw there was an old closed issue about this, but the documentation doesn't show this. It would have probably saved some time in me fiddling around with various approaches to including this module.
The text was updated successfully, but these errors were encountered:
Was trying to use this module to apply different default cache control settings on two Express routers mounted on an app, and it seem this use case is not supported (perhaps because of (odd?) way that the modules exposes a function the returns a named function?)
My code looked like:
This did not work and there was not any sort of error triggered. My routers just simply did not apply the correct headers.
I tried other alternatives like:
and:
but wasn't able to get to work until finally just doing:
Figured I would open an issue, as it would be unexpected behavior IMO middleware to not work on a router.
I also think it would be extremely helpful to include information on how to properly require the module in your documentation. I saw there was an old closed issue about this, but the documentation doesn't show this. It would have probably saved some time in me fiddling around with various approaches to including this module.
The text was updated successfully, but these errors were encountered: