From 3163fec4985ebc87ea859087cdedacad749096d9 Mon Sep 17 00:00:00 2001 From: huanghongfeng <huanghongfeng@hnkhzn.com> Date: 星期五, 28 二月 2025 19:15:39 +0800 Subject: [PATCH] 1 --- 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Program.cs | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Program.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Program.cs" index db3296b..514202e 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Program.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Program.cs" @@ -21,6 +21,7 @@ using Autofac.Core; using WIDESEAWCS_QuartzJob.QuartzExtensions; using Microsoft.AspNetCore.Builder; +using System.Configuration; var builder = WebApplication.CreateBuilder(args); @@ -61,7 +62,7 @@ builder.Services.AddHttpContextSetup(); -builder.Services.AddHostedService<QuartzJobHostedService>(); +builder.Services.AddHostedService<QuartzJobHostedService>();//任务调度 启动服务 builder.Services.AddMvc(options => { @@ -107,7 +108,10 @@ app.ConfigureApplication();//配置文件 app.UseApplicationSetup();//启动配置 app.UseSession(); -if (app.Environment.IsDevelopment()) + + + +//if (app.Environment.IsDevelopment()) { //todo //app.UseSwaggerAuthorized(); @@ -116,10 +120,11 @@ 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(); -- Gitblit v1.9.3