Hangfire Discussion

Include URL subpath when using Hangfire Dashboard

Tags: #<Tag:0x00007f84fb9fa600>


We have implemented a custom IDashboardAuthorizationFilter to authorize user by roles (received from a SAML Token) to access the hangfire dashboard. In our environement everything works fine, but when deployed in the customer environment (Test and Integration) because the js and css files can’t be loaded (404 not found) and the links within the dashboard do not point to the correct URL.

The reason lies in the routing/network configuration:

All calls including the subpath services/m-api are being routed to the backend, the others to the frontend.
Hangfire is being exposed from the backend.

Hangfire uses the root URL (https://intranet.ch/hangfire) whereas it should be using the URL forwarded to the backend (https://intranet.ch/services/m-api/hangfire).

How can we offer a functioning Hangfire Dashboard in the described customer szenario?