| | |
| | | app.UseMiniProfiler();//性能分析器 |
| | | app.ConfigureApplication();//配置文件 |
| | | app.UseApplicationSetup();//启动配置 |
| | | |
| | | app.UseAllServicesMiddle(builder.Services); |
| | | |
| | | app.UseSession(); |
| | | if (app.Environment.IsDevelopment()) |
| | | //if (app.Environment.IsDevelopment()) |
| | | { |
| | | //todo |
| | | //app.UseSwaggerAuthorized(); |
| | | app.UseSwaggerMiddle(() => Assembly.GetExecutingAssembly().GetManifestResourceStream("WIDESEAWCS_Server.index.html")); |
| | | app.UseSwaggerAuthorized(); |
| | | app.UseSwaggerMiddle(() => Assembly.GetExecutingAssembly().GetManifestResourceStream("WIDESEAWCS_Server.index.html") ?? throw new Exception("未找到WIDESEAWCS_Server.index.html文件")); |
| | | }//判断是否需要打开swagger |
| | | |
| | | app.UseIpLimitMiddle(); |
| | |
| | | //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(); |