Skip to content

Commit 410dd91

Browse files
committed
Чтение конфигурации Kestrel из appsettings.json
1 parent dbaac06 commit 410dd91

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/OneScript.Web.Server/WebServer.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ This Source Code Form is subject to the terms of the
1616
using System.Threading.Tasks;
1717
using Microsoft.AspNetCore.Diagnostics;
1818
using ExecutionContext = ScriptEngine.Machine.ExecutionContext;
19+
using Microsoft.Extensions.Configuration;
1920

2021
namespace OneScript.Web.Server
2122
{
@@ -91,6 +92,10 @@ private void ConfigureApp()
9192
var builder = WebApplication.CreateBuilder(appOptions);
9293
builder.WebHost.ConfigureKestrel(options =>
9394
{
95+
var kestrelSection = builder.Configuration.GetSection("Kestrel");
96+
options.Configure(kestrelSection);
97+
kestrelSection.Bind(options);
98+
9499
options.AllowSynchronousIO = true;
95100
options.ListenAnyIP(Port);
96101
});

0 commit comments

Comments
 (0)