diff --git a/WebStarter/Program.cs b/WebStarter/Program.cs index 52047e9..62c75a0 100644 --- a/WebStarter/Program.cs +++ b/WebStarter/Program.cs @@ -90,8 +90,13 @@ app.UseAuthorization(); app.UseCors("myCors"); app.MapControllers(); -AppInfo.Container = app.Services.GetAutofacRoot(); +var list = AppSettingsHelper.GetContent("Kestrel", "Endpoints", "http", "Url"); +foreach (var s in list.Split(";")) +{ + app.Urls.Add(s); +} +AppInfo.Container = app.Services.GetAutofacRoot(); ClientMgr.InitClient(); app.Run(); \ No newline at end of file diff --git a/WebStarter/appsettings.json b/WebStarter/appsettings.json index c8ae7a4..3bd6db4 100644 --- a/WebStarter/appsettings.json +++ b/WebStarter/appsettings.json @@ -20,5 +20,12 @@ "Microsoft.AspNetCore": "Warning" } }, + "Kestrel": { + "Endpoints": { + "http": { + "Url": "http://0.0.0.0:5035" + } + } + }, "AllowedHosts": "*" }