mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-23 13:13:23 +00:00
Don't crash when route path is a regex
This commit is contained in:
parent
f8dec76464
commit
0c0548ea85
1 changed files with 1 additions and 1 deletions
|
@ -9,7 +9,7 @@ module.exports.logger = (req, res, next) ->
|
||||||
res.end = () ->
|
res.end = () ->
|
||||||
end.apply(this, arguments)
|
end.apply(this, arguments)
|
||||||
responseTime = new Date() - startTime
|
responseTime = new Date() - startTime
|
||||||
routePath = req.route.path.replace(/\//g, '-').slice(1)
|
routePath = req.route.path.toString().replace(/\//g, '-').slice(1)
|
||||||
|
|
||||||
processName = if settings.internal.web.name? then "web-#{settings.internal.web.name}" else "web"
|
processName = if settings.internal.web.name? then "web-#{settings.internal.web.name}" else "web"
|
||||||
key = "#{os.hostname()}.#{processName}.#{routePath}".toLowerCase().trim()
|
key = "#{os.hostname()}.#{processName}.#{routePath}".toLowerCase().trim()
|
||||||
|
|
Loading…
Reference in a new issue