express-redis-cache
express-redis-cache copied to clipboard
DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
Node version 12 deprecated OutgoingMessage.prototype._headers, which is used to create cache route.
The line using this._headers
:
./node_modules/express-redis-cache/lib/ExpressRedisCache/route.js:200:30
Instead of using this._headers
, we need to use obj.getHeaders()
to get the headers object.
So we should replace the property name ._headers
with the function .getHeaders()
. Same results using either one except using the function is the supported method and removes the deprecation warning.
I'm preparing a Pull Request to solve this issue.
Edit: Pull Request opened (#126).
I used try/catch
to make this compatible with all node versions.
Is there any update to this?
Is there any updates guys?
Is there any updates guys?