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
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.
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 useobj.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.The text was updated successfully, but these errors were encountered: