File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 22// The .NET Foundation licenses this file to you under the MIT license.
33
44using Microsoft . AspNetCore . Builder ;
5+ using Microsoft . AspNetCore . HttpOverrides ;
56using Microsoft . Extensions . Configuration ;
67using Microsoft . Extensions . Options ;
7- using System . Net ;
88
99namespace Microsoft . AspNetCore ;
1010
@@ -53,7 +53,7 @@ public void Configure(ForwardedHeadersOptions options)
5353 var knownNetworks = _configuration [ "ForwardedHeaders_KnownIPNetworks" ] ? . Split ( ',' , StringSplitOptions . RemoveEmptyEntries | StringSplitOptions . TrimEntries ) ?? [ ] ;
5454 foreach ( var network in knownNetworks )
5555 {
56- if ( IPNetwork . TryParse ( network , out var ipNetwork ) )
56+ if ( System . Net . IPNetwork . TryParse ( network , out var ipNetwork ) )
5757 {
5858 options . KnownIPNetworks . Add ( ipNetwork ) ;
5959 }
@@ -62,7 +62,7 @@ public void Configure(ForwardedHeadersOptions options)
6262 var knownProxies = _configuration [ "ForwardedHeaders_KnownProxies" ] ? . Split ( ',' , StringSplitOptions . RemoveEmptyEntries | StringSplitOptions . TrimEntries ) ?? [ ] ;
6363 foreach ( var proxy in knownProxies )
6464 {
65- if ( IPAddress . TryParse ( proxy , out var ipAddress ) )
65+ if ( System . Net . IPAddress . TryParse ( proxy , out var ipAddress ) )
6666 {
6767 options . KnownProxies . Add ( ipAddress ) ;
6868 }
You can’t perform that action at this time.
0 commit comments