mirror of
https://github.com/overleaf/overleaf.git
synced 2024-09-16 02:52:31 -04: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
|
## v3.0.0
|
||||||
|
|
||||||
* Improve logging in Google Cloud Platform. Set environment variable `GCP_LOGGING=true` to enable.
|
* Improve logging in Google Cloud Platform. Set environment variable `GCP_LOGGING=true` to enable.
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
"url": "https://github.com/overleaf/overleaf"
|
"url": "https://github.com/overleaf/overleaf"
|
||||||
},
|
},
|
||||||
"license": "AGPL-3.0-only",
|
"license": "AGPL-3.0-only",
|
||||||
"version": "3.1.0",
|
"version": "3.1.1",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "mocha --grep=$MOCHA_GREP test/**/*.js",
|
"test": "mocha --grep=$MOCHA_GREP test/**/*.js",
|
||||||
"format": "prettier --list-different $PWD/'**/*.js'",
|
"format": "prettier --list-different $PWD/'**/*.js'",
|
||||||
|
|
|
@ -29,18 +29,20 @@ function reqSerializer(req) {
|
||||||
'content-length': headers['content-length'],
|
'content-length': headers['content-length'],
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
const projectId =
|
if (req.params) {
|
||||||
req.params.projectId || req.params.project_id || req.params.Project_id
|
const projectId =
|
||||||
const userId = req.params.userId || req.params.user_id
|
req.params.projectId || req.params.project_id || req.params.Project_id
|
||||||
const docId = req.params.docId || req.params.doc_id
|
const userId = req.params.userId || req.params.user_id
|
||||||
if (projectId) {
|
const docId = req.params.docId || req.params.doc_id
|
||||||
entry.projectId = projectId
|
if (projectId) {
|
||||||
}
|
entry.projectId = projectId
|
||||||
if (userId) {
|
}
|
||||||
entry.userId = userId
|
if (userId) {
|
||||||
}
|
entry.userId = userId
|
||||||
if (docId) {
|
}
|
||||||
entry.docId = docId
|
if (docId) {
|
||||||
|
entry.docId = docId
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return entry
|
return entry
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue