Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Commit

Permalink
Remove unnecessary per-request replacement option lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
calebkiage committed Nov 2, 2023
1 parent c62b5b3 commit 881a1be
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/Middleware/UriReplacementHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,7 @@ protected override async Task<HttpResponseMessage> SendAsync(

try
{
var uriReplacementHandlerOption = request.GetRequestOption<IUriReplacementHandlerOption>() ?? uriReplacement;
if (uriReplacement.IsEnabled()) {
request.RequestUri = uriReplacementHandlerOption.Replace(request.RequestUri);
}
request.RequestUri = uriReplacement.Replace(request.RequestUri);
return await base.SendAsync(request, cancellationToken);
}
finally
Expand Down

0 comments on commit 881a1be

Please sign in to comment.