- Create authorization filter to bypass Hangfire dashboard authentication - Allow unrestricted access to /hangfire dashboard for local development - Note: Should be replaced with proper authentication in production
18 lines
520 B
C#
18 lines
520 B
C#
using Hangfire.Dashboard;
|
|
|
|
namespace ECMJobRunner.WebCron
|
|
{
|
|
/// <summary>
|
|
/// Authorization filter that allows all users to access Hangfire Dashboard
|
|
/// WARNING: This is for development only! Use proper authentication in production.
|
|
/// </summary>
|
|
public class AllowAllDashboardAuthorizationFilter : IDashboardAuthorizationFilter
|
|
{
|
|
public bool Authorize(DashboardContext context)
|
|
{
|
|
// Allow all users - FOR DEVELOPMENT ONLY
|
|
return true;
|
|
}
|
|
}
|
|
}
|