Skip to content

Commit

Permalink
feat: expose Kestrel options in appsettings.json (#163)
Browse files Browse the repository at this point in the history
Expose Kestrel options in appsettings.json to allow the customization to the web server.

Fixes #163.
  • Loading branch information
hez2010 committed Nov 2, 2023
1 parent 35e738f commit 6bdcd92
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/GZCTF/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@

WebApplicationBuilder builder = WebApplication.CreateBuilder(args);

builder.WebHost.ConfigureKestrel(options =>
{
var kestrelSection = builder.Configuration.GetSection("Kestrel");
options.Configure(kestrelSection);
kestrelSection.Bind(options);
});

Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);

GZCTF.Program.Banner();
Expand Down

0 comments on commit 6bdcd92

Please sign in to comment.