From 8ecf56c5a7d804a90a4a623fef2f94de86e03d14 Mon Sep 17 00:00:00 2001 From: Frank Pavageau Date: Wed, 1 Apr 2020 17:54:47 +0200 Subject: [PATCH] Fix some ESLint issues --- lib/validateResourcePath.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/validateResourcePath.js b/lib/validateResourcePath.js index 57e36b0..5afc661 100644 --- a/lib/validateResourcePath.js +++ b/lib/validateResourcePath.js @@ -66,7 +66,7 @@ module.exports = function (config, req, res, decodedToken, productOnly, logger, regExPatternStr = regExPatternStr.replace(/\*/g, '\\w+'); placeholder = new RegExp(placeholder, "g"); - regExPatternStr = regExPatternStr.replace(placeholder, '\.*'); + regExPatternStr = regExPatternStr.replace(placeholder, '.*'); try { var proxyRegEx = new RegExp(`^${regExPatternStr}$`, 'ig'); @@ -86,9 +86,10 @@ module.exports = function (config, req, res, decodedToken, productOnly, logger, debug("matches proxy rules: " + matchesProxyRules); //add pattern matching here - if (!productOnly) + if (!productOnly) { return matchesProxyRules && validProxyNames.indexOf(proxy.name) >= 0; - else + } else { return matchesProxyRules; + } }); } \ No newline at end of file