From 0c0548ea85c1ce5da1027d4a0efcea356333276b Mon Sep 17 00:00:00 2001 From: James Allen Date: Wed, 30 Apr 2014 09:42:20 +0100 Subject: [PATCH] Don't crash when route path is a regex --- services/web/app/coffee/infrastructure/Monitor/HTTP.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/web/app/coffee/infrastructure/Monitor/HTTP.coffee b/services/web/app/coffee/infrastructure/Monitor/HTTP.coffee index 3dcc979af0..8e2938b5f3 100644 --- a/services/web/app/coffee/infrastructure/Monitor/HTTP.coffee +++ b/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()