From 881a1be20b8170708404a8ed863f277cce37a503 Mon Sep 17 00:00:00 2001 From: Caleb Kiage <747955+calebkiage@users.noreply.github.com> Date: Thu, 2 Nov 2023 17:12:43 +0300 Subject: [PATCH] Remove unnecessary per-request replacement option lookup --- src/Middleware/UriReplacementHandler.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Middleware/UriReplacementHandler.cs b/src/Middleware/UriReplacementHandler.cs index 05e43ad..9c86409 100644 --- a/src/Middleware/UriReplacementHandler.cs +++ b/src/Middleware/UriReplacementHandler.cs @@ -44,10 +44,7 @@ protected override async Task SendAsync( try { - var uriReplacementHandlerOption = request.GetRequestOption() ?? uriReplacement; - if (uriReplacement.IsEnabled()) { - request.RequestUri = uriReplacementHandlerOption.Replace(request.RequestUri); - } + request.RequestUri = uriReplacement.Replace(request.RequestUri); return await base.SendAsync(request, cancellationToken); } finally