From 6e75810b2bc6e50e1d180721b30558b632499fa8 Mon Sep 17 00:00:00 2001 From: smartwyy <645583145@qq.com> Date: Thu, 30 May 2024 16:46:36 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AB=AF=E5=8F=A3=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebStarter/Program.cs | 5 +++++ WebStarter/appsettings.json | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/WebStarter/Program.cs b/WebStarter/Program.cs index b8ef083..55ac4e6 100644 --- a/WebStarter/Program.cs +++ b/WebStarter/Program.cs @@ -147,6 +147,11 @@ app.UseAuthorization(); app.UseCors("myCors"); app.MapControllers(); +var list = AppSettingsHelper.GetContent("Kestrel", "Endpoints", "http", "Url"); +foreach (var s in list.Split(";")) +{ + app.Urls.Add(s); +} AppInfo.Container = app.Services.GetAutofacRoot(); diff --git a/WebStarter/appsettings.json b/WebStarter/appsettings.json index 5f58c13..c9a1fbc 100644 --- a/WebStarter/appsettings.json +++ b/WebStarter/appsettings.json @@ -68,5 +68,12 @@ "HttpContextRequest": { "Scheme": "http://0.0.0.0:5034" + }, + "Kestrel": { + "Endpoints": { + "http": { + "Url": "http://0.0.0.0:5034" + } + } } }