| | |
| | | using Autofac.Core; |
| | | using WIDESEAWCS_QuartzJob.QuartzExtensions; |
| | | using Microsoft.AspNetCore.Builder; |
| | | using System.Configuration; |
| | | |
| | | var builder = WebApplication.CreateBuilder(args); |
| | | |
| | |
| | | |
| | | builder.Services.AddHttpContextSetup(); |
| | | |
| | | builder.Services.AddHostedService<QuartzJobHostedService>(); |
| | | builder.Services.AddHostedService<QuartzJobHostedService>();//浠诲姟璋冨害 鍚姩鏈嶅姟 |
| | | |
| | | builder.Services.AddMvc(options => |
| | | { |
| | |
| | | app.ConfigureApplication();//閰嶇疆鏂囦欢 |
| | | app.UseApplicationSetup();//鍚姩閰嶇疆 |
| | | app.UseSession(); |
| | | if (app.Environment.IsDevelopment()) |
| | | |
| | | |
| | | |
| | | //if (app.Environment.IsDevelopment()) |
| | | { |
| | | //todo |
| | | //app.UseSwaggerAuthorized(); |
| | |
| | | |
| | | app.UseIpLimitMiddle(); |
| | | app.UseApiLogMiddleware(); |
| | | |
| | | //todo |
| | | //app.UseRecordAccessLogsMiddle(); |
| | | |
| | | app.UseCors(AppSettings.app(new string[] { "Cors", "PolicyName" })); |
| | | app.UseCors(AppSettings.Get(new string[] { "Cors", "PolicyName" })); |
| | | |
| | | DefaultFilesOptions defaultFilesOptions = new DefaultFilesOptions(); |
| | | defaultFilesOptions.DefaultFileNames.Clear(); |