|
|
|
|
@ -1,4 +1,5 @@
@@ -1,4 +1,5 @@
|
|
|
|
|
using System.Net; |
|
|
|
|
using Bit.IntegrationTestCommon.Factories; |
|
|
|
|
using Microsoft.AspNetCore.Builder; |
|
|
|
|
using Microsoft.AspNetCore.Hosting; |
|
|
|
|
using Microsoft.AspNetCore.Http; |
|
|
|
|
@ -13,7 +14,7 @@ public class FakeRemoteIpAddressMiddleware
@@ -13,7 +14,7 @@ public class FakeRemoteIpAddressMiddleware
|
|
|
|
|
public FakeRemoteIpAddressMiddleware(RequestDelegate next, IPAddress fakeIpAddress = null) |
|
|
|
|
{ |
|
|
|
|
_next = next; |
|
|
|
|
_fakeIpAddress = fakeIpAddress ?? IPAddress.Parse("127.0.0.1"); |
|
|
|
|
_fakeIpAddress = fakeIpAddress ?? IPAddress.Parse(FactoryConstants.WhitelistedIp); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public async Task Invoke(HttpContext httpContext) |
|
|
|
|
|