Skip to content

Commit 5fbce09

Browse files
authored
Merge pull request EvilBeaver#1525 from Stivo182/feat/form-options
(WebServer) Чтение конфигурационных настроек FormOptions
2 parents c1d7e4f + f1a4c97 commit 5fbce09

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/OneScript.Web.Server/WebServer.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ This Source Code Form is subject to the terms of the
77
using Microsoft.AspNetCore.Builder;
88
using Microsoft.AspNetCore.Hosting;
99
using Microsoft.AspNetCore.Http;
10+
using Microsoft.AspNetCore.Http.Features;
1011
using OneScript.Contexts;
1112
using OneScript.Types;
1213
using ScriptEngine.Machine;
@@ -16,6 +17,7 @@ This Source Code Form is subject to the terms of the
1617
using System.Threading.Tasks;
1718
using Microsoft.AspNetCore.Diagnostics;
1819
using Microsoft.Extensions.Configuration;
20+
using Microsoft.Extensions.DependencyInjection;
1921
using OneScript.Execution;
2022

2123
namespace OneScript.Web.Server
@@ -100,6 +102,8 @@ private void ConfigureApp()
100102
options.ListenAnyIP(Port);
101103
});
102104

105+
builder.Services.Configure<FormOptions>(builder.Configuration.GetSection("FormOptions"));
106+
103107
_app = builder.Build();
104108

105109
if (_useStaticFiles)

0 commit comments

Comments
 (0)