File tree Expand file tree Collapse file tree
sample/LocalPortFilteringDemo Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -102,9 +102,8 @@ app.MapHealthChecks("/healthz").RequireLocalPortFiltering(allowPort: 5105);
102102You can use additional middleware conditionally based on the local port:
103103
104104``` csharp
105- app .UseWhen (context => context .Connection .LocalPort == 5099 ,
105+ app .UseWhen (context => context .Connection .LocalPort != 5105 ,
106106 appBuilder => appBuilder .UseHttpsRedirection ());
107-
108107```
109108
110109## Contribution
Original file line number Diff line number Diff line change 1111
1212app . UseSwagger ( ) ;
1313app . UseSwaggerUI ( ) ;
14- app . UseWhen ( context => context . Connection . LocalPort == 5099 ,
14+ app . UseWhen ( context => context . Connection . LocalPort != 5105 ,
1515 appBuilder => appBuilder . UseHttpsRedirection ( ) ) ;
1616app . UseAuthorization ( ) ;
1717app . UseLocalPortFiltering ( ) ;
You can’t perform that action at this time.
0 commit comments