Explorar o código

Don't crash when route path is a regex

James Allen %!s(int64=12) %!d(string=hai) anos
pai
achega
0c0548ea85
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      services/web/app/coffee/infrastructure/Monitor/HTTP.coffee

+ 1 - 1
services/web/app/coffee/infrastructure/Monitor/HTTP.coffee

@@ -9,7 +9,7 @@ module.exports.logger = (req, res, next) ->
 	res.end = () ->
 		end.apply(this, arguments)
 		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"
 		key = "#{os.hostname()}.#{processName}.#{routePath}".toLowerCase().trim()