16 references to TargetLocationInterceptor
Aspire.Dashboard (4)
Components\Layout\MainLayout.razor.cs (1)
94
if (
TargetLocationInterceptor
.InterceptTargetLocation(NavigationManager.BaseUri, context.TargetLocation, out var newTargetLocation))
DashboardWebApplication.cs (3)
374
if (context.Request.Path.Equals(
TargetLocationInterceptor
.ResourcesPath, StringComparisons.UrlPath))
379
context.Response.Redirect(
TargetLocationInterceptor
.StructuredLogsPath);
762
options.CallbackPath =
TargetLocationInterceptor
.ResourcesPath;
Aspire.Dashboard.Tests (12)
Model\TargetLocationInterceptorTests.cs (12)
14
Assert.True(
TargetLocationInterceptor
.InterceptTargetLocation("http://localhost", "/", out var newTargetLocation));
15
Assert.Equal(
TargetLocationInterceptor
.StructuredLogsPath, newTargetLocation);
21
Assert.True(
TargetLocationInterceptor
.InterceptTargetLocation("http://localhost", "http://localhost/", out var newTargetLocation));
22
Assert.Equal(
TargetLocationInterceptor
.StructuredLogsPath, newTargetLocation);
28
Assert.True(
TargetLocationInterceptor
.InterceptTargetLocation("http://localhost", "http://localhost", out var newTargetLocation));
29
Assert.Equal(
TargetLocationInterceptor
.StructuredLogsPath, newTargetLocation);
35
Assert.True(
TargetLocationInterceptor
.InterceptTargetLocation("http://LOCALHOST", "http://localhost/", out var newTargetLocation));
36
Assert.Equal(
TargetLocationInterceptor
.StructuredLogsPath, newTargetLocation);
42
Assert.False(
TargetLocationInterceptor
.InterceptTargetLocation("http://localhost",
TargetLocationInterceptor
.StructuredLogsPath, out _));
48
Assert.False(
TargetLocationInterceptor
.InterceptTargetLocation("http://localhost", "http://localhost:8888/", out _));
54
Assert.False(
TargetLocationInterceptor
.InterceptTargetLocation("http://localhost/", "http://localhost:8888/", out _));