diff --git a/Src/Dlhis.ScheduledTask/HangfirePack.cs b/Src/Dlhis.ScheduledTask/HangfirePack.cs index 040d4e0d..4359a5c1 100644 --- a/Src/Dlhis.ScheduledTask/HangfirePack.cs +++ b/Src/Dlhis.ScheduledTask/HangfirePack.cs @@ -7,7 +7,7 @@ namespace Dlhis.ScheduledTask { public class HangfirePack : BaseAppPack { - public override bool IsBeforeUseRouting { get; } + public override bool IsBeforeUseRouting => true; public override void ConfigureServices(IServiceCollection services) { @@ -36,20 +36,24 @@ namespace Dlhis.ScheduledTask Authorization = new[] { new BasicAuthAuthorizationFilter(new BasicAuthAuthorizationFilterOptions - { + { + RequireSsl = false, + SslRedirect = false, Users = new [] { new BasicAuthAuthorizationUser { Login ="admin", - PasswordClear = "zxc111" + PasswordClear = "admin" } } }) } }); - + app.UseHangfireDashboard(); BackgroundJob.Enqueue(() => Console.WriteLine("This is a background job.")); + + } } }