Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(audit): use public APIs for accessing response headers
- `res._headers` has been deprecated and accessing it in `auditResponseSerializer` generates exception (RangeError: Maximum call stack size exceeded) - `res.getHeaders` returns an object that does not inherit from `Object`, so is unsuitable for use here - falls back to `res._headers` if public APIs (introduced in v7.7.0) do not exist - see https://nodejs.org/api/deprecations.html#deprecations_dep0066_outgoingmessage_headers_outgoingmessage_headernames - see https://nodejs.org/api/http.html#http_response_getheaders
- Loading branch information