File tree Expand file tree Collapse file tree 1 file changed +7
-10
lines changed
src/Server/src/AspNet/Security Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -22,20 +22,17 @@ public EnsureAuthenticatedMiddleware(
2222
2323 public async Task InvokeAsync ( HttpContext context )
2424 {
25- if ( context . Request . Path . StartsWithSegments ( "/_health" ) ||
26- context . Request . Path . StartsWithSegments ( "/fonts" ) ||
27- context . Request . Path . StartsWithSegments ( "/api/session" ) ||
28- _env . IsDevelopment ( ) )
29- {
30- await _next ( context ) ;
31-
32- return ;
33- }
34-
3525 if ( context . Request . Path . StartsWithSegments ( "/api/session/auth" ) )
3626 {
3727 await context . ChallengeAsync ( ) ;
3828 }
29+ else if ( context . Request . Path . StartsWithSegments ( "/_health" ) ||
30+ context . Request . Path . StartsWithSegments ( "/fonts" ) ||
31+ context . Request . Path . StartsWithSegments ( "/api/session" ) ||
32+ _env . IsDevelopment ( ) )
33+ {
34+ await _next ( context ) ;
35+ }
3936 else if (
4037 context . Request . Path . StartsWithSegments ( "/api" )
4138 || context . Request . Path . StartsWithSegments ( "/graphql" )
You can’t perform that action at this time.
0 commit comments