From 9fd6335db821d29a4a419bc1f7bf3547632ae0dd Mon Sep 17 00:00:00 2001 From: Thaddee Tyl Date: Thu, 30 Oct 2014 08:08:59 +0100 Subject: [PATCH] GitHub: specify no slashes --- server.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server.js b/server.js index 8eff513..5db7e7f 100644 --- a/server.js +++ b/server.js @@ -1511,7 +1511,7 @@ cache(function(data, match, sendBadge, request) { })); // GitHub tag integration. -camp.route(/^\/github\/tag\/(.*)\/(.*)\.(svg|png|gif|jpg|json)$/, +camp.route(/^\/github\/tag\/([^\/]+)\/([^\/]+)\.(svg|png|gif|jpg|json)$/, cache(function(data, match, sendBadge, request) { var user = match[1]; // eg, strongloop/express var repo = match[2]; @@ -1557,7 +1557,7 @@ cache(function(data, match, sendBadge, request) { })); // GitHub release integration. -camp.route(/^\/github\/release\/(.*)\/(.*)\.(svg|png|gif|jpg|json)$/, +camp.route(/^\/github\/release\/([^\/]+)\/([^\/]+)\.(svg|png|gif|jpg|json)$/, cache(function(data, match, sendBadge, request) { var user = match[1]; // eg, qubyte/rubidium var repo = match[2]; @@ -1607,7 +1607,7 @@ cache(function(data, match, sendBadge, request) { })); // GitHub issues integration. -camp.route(/^\/github\/issues\/(.*)\/(.*)\.(svg|png|gif|jpg|json)$/, +camp.route(/^\/github\/issues\/([^\/]+)\/([^\/]+)\.(svg|png|gif|jpg|json)$/, cache(function(data, match, sendBadge, request) { var user = match[1]; // eg, qubyte/rubidium var repo = match[2];