From b690122722670d9510f94c1195dd8a66afa94ddb Mon Sep 17 00:00:00 2001 From: TomPallister Date: Sun, 6 Nov 2016 16:21:38 +0000 Subject: [PATCH] blah --- .../DownstreamRouteFinder/Finder/DownstreamRouteFinder.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Ocelot/DownstreamRouteFinder/Finder/DownstreamRouteFinder.cs b/src/Ocelot/DownstreamRouteFinder/Finder/DownstreamRouteFinder.cs index 81390cfe..752da281 100644 --- a/src/Ocelot/DownstreamRouteFinder/Finder/DownstreamRouteFinder.cs +++ b/src/Ocelot/DownstreamRouteFinder/Finder/DownstreamRouteFinder.cs @@ -25,7 +25,9 @@ namespace Ocelot.DownstreamRouteFinder.Finder { var configuration = _configProvider.Get(); - foreach (var reRoute in configuration.Data.ReRoutes.Where(r => string.Equals(r.UpstreamHttpMethod, upstreamHttpMethod, StringComparison.CurrentCultureIgnoreCase))) + var applicableReRoutes = configuration.Data.ReRoutes.Where(r => string.Equals(r.UpstreamHttpMethod, upstreamHttpMethod, StringComparison.CurrentCultureIgnoreCase)); + + foreach (var reRoute in applicableReRoutes) { var urlMatch = _urlMatcher.Match(upstreamUrlPath, reRoute.UpstreamTemplatePattern);