mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
[http] use public node api for getting the response content-length
This commit is contained in:
parent
b2e661b408
commit
37fda043d4
1 changed files with 2 additions and 2 deletions
|
@ -39,7 +39,7 @@ module.exports.monitor = logger => (function(req, res, next) {
|
||||||
requestUrl: reqUrl,
|
requestUrl: reqUrl,
|
||||||
requestSize,
|
requestSize,
|
||||||
status: res.statusCode,
|
status: res.statusCode,
|
||||||
responseSize: (res._headers != null ? res._headers["content-length"] : undefined),
|
responseSize: res.getHeader("content-length"),
|
||||||
userAgent: req.headers["user-agent"],
|
userAgent: req.headers["user-agent"],
|
||||||
remoteIp,
|
remoteIp,
|
||||||
referer: referrer,
|
referer: referrer,
|
||||||
|
@ -61,7 +61,7 @@ module.exports.monitor = logger => (function(req, res, next) {
|
||||||
"content-length": req.headers["content-length"]
|
"content-length": req.headers["content-length"]
|
||||||
},
|
},
|
||||||
res: {
|
res: {
|
||||||
"content-length": (res._headers != null ? res._headers["content-length"] : undefined),
|
"content-length": res.getHeader("content-length"),
|
||||||
statusCode: res.statusCode
|
statusCode: res.statusCode
|
||||||
},
|
},
|
||||||
"response-time": responseTimeMs
|
"response-time": responseTimeMs
|
||||||
|
|
Loading…
Reference in a new issue