NewLife/Stardust

fix(WebApi): 更新应用程序端口配置,避免与其他服务冲突
何炳宏 authored at 2026-09-14 08:56:02
e45b74e
Tree
1 Parent(s) 5a8ccaf
Summary: 2 changed files with 2 additions and 5 deletions.
Modified +1 -1
Modified +1 -4
Modified +1 -1
diff --git a/Stardust.WebApi/appsettings.json b/Stardust.WebApi/appsettings.json
index 810d7c3..289fb1c 100644
--- a/Stardust.WebApi/appsettings.json
+++ b/Stardust.WebApi/appsettings.json
@@ -7,7 +7,7 @@
     }
   },
   "AllowedHosts": "*",
-  "Urls": "http://*:6680",
+  "Urls": "http://*:6681",
   "StarServer": "http://127.0.0.1:6600",
   //"RedisCache": "server=127.0.0.1;password=;db=1",
   //"RedisQueue": "server=127.0.0.1;password=;db=3",
Modified +1 -4
diff --git a/Stardust.WebApi/Program.cs b/Stardust.WebApi/Program.cs
index 7f6c664..ccaf459 100644
--- a/Stardust.WebApi/Program.cs
+++ b/Stardust.WebApi/Program.cs
@@ -1,4 +1,4 @@
-using NewLife.Cube.Swagger;
+using NewLife.Cube.Swagger;
 using NewLife.Log;
 using Stardust.Web;
 
@@ -6,9 +6,6 @@ XTrace.UseConsole();
 
 var builder = WebApplication.CreateBuilder(args);
 
-// 解耦 WebApi 监听独立端口,避免与 Stardust.Web(Razor 管理界面, 6680) 冲突
-builder.WebHost.UseUrls("http://*:6681");
-
 // 桥接现有 Startup(ConfigureServices / Configure)
 var startup = new Startup(builder.Configuration);
 builder.Host.ConfigureServices((_, services) => startup.ConfigureServices(services));