mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-13 12:14:20 +01:00
get kestrel server options from config
This commit is contained in:
parent
d7eee2af8f
commit
61111d387a
1 changed files with 2 additions and 0 deletions
|
|
@ -7,6 +7,7 @@ using MareSynchronosShared.Services;
|
||||||
using MareSynchronosShared.Utils;
|
using MareSynchronosShared.Utils;
|
||||||
using Microsoft.AspNetCore.Authentication.JwtBearer;
|
using Microsoft.AspNetCore.Authentication.JwtBearer;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
using Microsoft.AspNetCore.Server.Kestrel.Core;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
using Microsoft.IdentityModel.Tokens;
|
using Microsoft.IdentityModel.Tokens;
|
||||||
|
|
@ -35,6 +36,7 @@ public class Startup
|
||||||
|
|
||||||
services.Configure<StaticFilesServerConfiguration>(Configuration.GetRequiredSection("MareSynchronos"));
|
services.Configure<StaticFilesServerConfiguration>(Configuration.GetRequiredSection("MareSynchronos"));
|
||||||
services.Configure<MareConfigurationAuthBase>(Configuration.GetRequiredSection("MareSynchronos"));
|
services.Configure<MareConfigurationAuthBase>(Configuration.GetRequiredSection("MareSynchronos"));
|
||||||
|
services.Configure<KestrelServerOptions>(Configuration.GetSection("Kestrel"));
|
||||||
services.AddSingleton(Configuration);
|
services.AddSingleton(Configuration);
|
||||||
|
|
||||||
var mareConfig = Configuration.GetRequiredSection("MareSynchronos");
|
var mareConfig = Configuration.GetRequiredSection("MareSynchronos");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue