113/03/12
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
using Hangfire.Annotations;
|
||||
using Hangfire.Dashboard;
|
||||
|
||||
namespace HangfireExample.WebService.Filters
|
||||
{
|
||||
/// <summary>
|
||||
/// Hangfire Dashboard 的認證過濾中介。
|
||||
/// </summary>
|
||||
public class DashboardAuthorizationFilter : IDashboardAuthorizationFilter
|
||||
{
|
||||
public bool Authorize([NotNull] DashboardContext context)
|
||||
{
|
||||
// 認證時,直接回傳成功(無驗證)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user