Skip to content

Commit

Permalink
chore: adjust config order
Browse files Browse the repository at this point in the history
  • Loading branch information
GZTimeWalker committed Feb 4, 2024
1 parent b640ef5 commit 739f17a
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/GZCTF/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@

WebApplicationBuilder builder = WebApplication.CreateBuilder(args);

Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);

GZCTF.Program.Banner();

FilePath.EnsureDirs();

#region Host

builder.Services.AddLocalization(options => options.ResourcesPath = "Resources")
.Configure<RequestLocalizationOptions>(options =>
{
Expand All @@ -45,21 +53,13 @@
options.Configure(builder.Configuration.GetSection("Kestrel"));
});

Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);

GZCTF.Program.Banner();

FilePath.EnsureDirs();

#region Logging

builder.Logging.ClearProviders();
builder.Logging.SetMinimumLevel(LogLevel.Trace);
builder.Host.UseSerilog(dispose: true);
builder.Configuration.AddEnvironmentVariables("GZCTF_");
Log.Logger = LogHelper.GetInitLogger();

#endregion Logging
#endregion Host

#region AppDbContext

Expand Down

0 comments on commit 739f17a

Please sign in to comment.