Can't navigate to HangFire Dashboard from deployed blazor wasm app

Viewed 64

I have asp.net hosted blazor wasm app that uses hangfire. I have the dashboard configured on the URL "/hangfire" with custom filter that analyzes an access token passed via a query parameter. Here is the related configure part from the startup:

        endpoints.MapHangfireDashboard(
            pattern: "/hangfire",
            options: new() { DashboardTitle = "Job Dashboard", Authorization = new[] { new HangFireAuthorizationFilter() } });

This works as long as I'm testing locally. When I deploy and I try to navigate to the dashboard via the navigation manager I geta 404:

    var accessToken = await LocalStorageService.GetItemAsync<string>(StorageConstants.AUTH_TOKEN);
    NavigationManager.NavigateTo($"/hangfire?token={accessToken}", forceLoad: true);

When I copy the URL and paste it in a new InPrivate tab it works as expected. For me it sounds like the Router catches the request and redirects to NotFound despite the forceLoad parameter being set to true. Is there any way how I can prevent that?

0 Answers
Related