mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #6215 from overleaf/ae-logger-req-params
[logger] Handle undefined req.params GitOrigin-RevId: cd435d906517034f78fdccc051625cbb537617d4
This commit is contained in:
parent
4dc4286d1b
commit
3864b5831e
3 changed files with 19 additions and 13 deletions
|
@ -1,3 +1,7 @@
|
|||
## v3.1.1
|
||||
|
||||
* Handle malformed requests in the req serializer
|
||||
|
||||
## v3.0.0
|
||||
|
||||
* Improve logging in Google Cloud Platform. Set environment variable `GCP_LOGGING=true` to enable.
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"url": "https://github.com/overleaf/overleaf"
|
||||
},
|
||||
"license": "AGPL-3.0-only",
|
||||
"version": "3.1.0",
|
||||
"version": "3.1.1",
|
||||
"scripts": {
|
||||
"test": "mocha --grep=$MOCHA_GREP test/**/*.js",
|
||||
"format": "prettier --list-different $PWD/'**/*.js'",
|
||||
|
|
|
@ -29,6 +29,7 @@ function reqSerializer(req) {
|
|||
'content-length': headers['content-length'],
|
||||
},
|
||||
}
|
||||
if (req.params) {
|
||||
const projectId =
|
||||
req.params.projectId || req.params.project_id || req.params.Project_id
|
||||
const userId = req.params.userId || req.params.user_id
|
||||
|
@ -42,6 +43,7 @@ function reqSerializer(req) {
|
|||
if (docId) {
|
||||
entry.docId = docId
|
||||
}
|
||||
}
|
||||
return entry
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue