20 references to TargetLocationInterceptor
Aspire.Dashboard (4)
Components\Layout\MainLayout.razor.cs (1)
168if (TargetLocationInterceptor.InterceptTargetLocation(NavigationManager.BaseUri, context.TargetLocation, out var newTargetLocation))
Components\Legacy\Layout\LegacyMainLayout.razor.cs (1)
155TargetLocationInterceptor.InterceptTargetLocation(NavigationManager.BaseUri, targetLocation, out var standaloneTarget))
DashboardWebApplication.cs (2)
555if (context.Request.Path.Value is { } requestPath && TargetLocationInterceptor.GetStandaloneLocation(requestPath) is { } standaloneLocation) 966options.CallbackPath = TargetLocationInterceptor.ResourcesPath;
Aspire.Dashboard.Tests (16)
Model\TargetLocationInterceptorTests.cs (16)
14Assert.True(TargetLocationInterceptor.InterceptTargetLocation("http://localhost", "/", out var newTargetLocation)); 15Assert.Equal(TargetLocationInterceptor.StructuredLogsPath, newTargetLocation); 21Assert.True(TargetLocationInterceptor.InterceptTargetLocation("http://localhost", "http://localhost/", out var newTargetLocation)); 22Assert.Equal(TargetLocationInterceptor.StructuredLogsPath, newTargetLocation); 28Assert.True(TargetLocationInterceptor.InterceptTargetLocation("http://localhost", "http://localhost", out var newTargetLocation)); 29Assert.Equal(TargetLocationInterceptor.StructuredLogsPath, newTargetLocation); 35Assert.True(TargetLocationInterceptor.InterceptTargetLocation("http://LOCALHOST", "http://localhost/", out var newTargetLocation)); 36Assert.Equal(TargetLocationInterceptor.StructuredLogsPath, newTargetLocation); 42Assert.False(TargetLocationInterceptor.InterceptTargetLocation("http://localhost", TargetLocationInterceptor.StructuredLogsPath, out _)); 48Assert.False(TargetLocationInterceptor.InterceptTargetLocation("http://localhost", "http://localhost:8888/", out _)); 54Assert.False(TargetLocationInterceptor.InterceptTargetLocation("http://localhost/", "http://localhost:8888/", out _)); 70Assert.Equal(expected, TargetLocationInterceptor.IsResourceServicePath(path)); 87Assert.Equal(expected, TargetLocationInterceptor.GetStandaloneLocation(path)); 93Assert.True(TargetLocationInterceptor.InterceptTargetLocation("http://localhost", "http://localhost/legacy", out var newTargetLocation)); 94Assert.Equal(TargetLocationInterceptor.LegacyStructuredLogsPath, newTargetLocation);