We are developing a web app using Dot NET Core. In this app, we have some long running processes for that we have decided to go with Hangfire. We are able to integrate Hangfire successfully and view the Hangfire Dashboard, and other pages like Retires, Jobs etc locally. But when we deploy the code, we can see the dashboard, but all the CSS and JS and Links are pointing to domain/hangfire/ instead of domain/appname/hangfire.
Our server is running on Linux and we are using Nginx to host web apps.
I assume that in Linux we are creating our Virtual Directory or appname dynamically, hangfire is not able to pick this. If we deploy this on a windows machine it is working fine.
Please see below the code we are using to setup hangfire.
public void ConfigureServices(IServiceCollection services)
{
services.AddHangfire(x => x.UseMemoryStorage());
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
app.UseHangfireServer();
app.UseHangfireDashboard("/hangfire");
}
This issue is not blocking us, but it will be very handy if we could able to see the dashboard.
Any help will be appreciated.