express-middleware-headers-server-timing
express-middleware-headers-server-timing copied to clipboard
Version 1.9.1 introduced a bug that breaks addHeaders on express 4.17.1
Version 1.9.1 has introduced a bug that crashes the middleware by trying to access headers with response.headers
. This will produce an error at least on express 4.17.1. I believe that the proper way of accessing the headers would be via response.get
.
Error produced:
TypeError: Cannot read property 'server-timing' of undefined
at ServerTiming.addHeaders (/home/phz/workspace/server-timing-header-bug/node_modules/server-timing-header/index.js:283:37)
Minimal example can be found at https://github.com/Hallian/server-timing-header-bug-minimal-example
Came across the same issue. I guess it was introduced by this commit https://github.com/SilentImp/express-middleware-headers-server-timing/commit/320574c2a8c8e2c087e44cd49b58882bc40b6d06
=___='' Ok, I need notifications. Will take a look at this shortly.