From 17e5dbd7bd0364e27a33f1a7dab91cf33d5dcabc Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期三, 04 三月 2026 11:52:12 +0800
Subject: [PATCH] 增强Redis缓存服务与设备通信优化

---
 Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs b/Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs
index 1b0c26a..26e3d14 100644
--- a/Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs
+++ b/Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs
@@ -64,6 +64,8 @@
     options.Filters.Add(typeof(ActionExecuteFilter));
 });
 
+builder.Services.AddScoped<HttpClientHelper>();
+
 builder.Services.AddAuthorizationSetup();
 
 builder.Services.AddIpPolicyRateLimitSetup(builder.Configuration);//IPLimit限流 启动服务
@@ -112,7 +114,6 @@
 //todo
 //app.UseRecordAccessLogsMiddle();
 
-app.UseCors(AppSettings.Get(new string[] { "Cors", "PolicyName" }));
 
 DefaultFilesOptions defaultFilesOptions = new DefaultFilesOptions();
 defaultFilesOptions.DefaultFileNames.Clear();
@@ -131,6 +132,8 @@
 
 app.UseRouting();
 
+app.UseCors(AppSettings.Get(new string[] { "Cors", "PolicyName" }));
+
 app.UseAuthentication();
 app.UseAuthorization();
 

--
Gitblit v1.9.3