Skip to content

Commit

Permalink
fix dependency injection
Browse files Browse the repository at this point in the history
  • Loading branch information
khavishbhundoo committed May 19, 2024
1 parent acc911f commit 8bf82dc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/CallMyTrade.Api/Middleware/ProtectEndpointMiddleware.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Text.Json;
using System.Threading.Tasks;
using Core.CallMyTrade;
using Light.GuardClauses;
using Microsoft.AspNetCore.Http;
using Serilog;

Expand All @@ -20,9 +21,11 @@ public sealed class ProtectEndpointMiddleware
"52.32.178.7"

Check warning on line 21 in src/CallMyTrade.Api/Middleware/ProtectEndpointMiddleware.cs

View workflow job for this annotation

GitHub Actions / build

Make sure using this hardcoded IP address '52.32.178.7' is safe here. (https://rules.sonarsource.com/csharp/RSPEC-1313)

Check warning on line 21 in src/CallMyTrade.Api/Middleware/ProtectEndpointMiddleware.cs

View workflow job for this annotation

GitHub Actions / build

Make sure using this hardcoded IP address '52.32.178.7' is safe here. (https://rules.sonarsource.com/csharp/RSPEC-1313)
];

public ProtectEndpointMiddleware(RequestDelegate next)
public ProtectEndpointMiddleware(RequestDelegate next, IDiagnosticContext diagnosticContext)
{
_next = next;
_diagnosticContext = diagnosticContext.MustNotBeNull();
_next = next.MustNotBeNull();

}

public async Task Invoke(HttpContext context)
Expand Down

0 comments on commit 8bf82dc

Please sign in to comment.