♻️ Add services to container in Pass

This commit is contained in:
2025-07-12 11:58:38 +08:00
parent ba49d1c7a7
commit 0318364bcf
8 changed files with 406 additions and 15 deletions

View File

@@ -0,0 +1,17 @@
namespace DysonNetwork.Pass.Startup;
public static class KestrelConfiguration
{
public static WebApplicationBuilder ConfigureAppKestrel(this WebApplicationBuilder builder)
{
builder.Host.UseContentRoot(Directory.GetCurrentDirectory());
builder.WebHost.ConfigureKestrel(options =>
{
options.Limits.MaxRequestBodySize = 50 * 1024 * 1024;
options.Limits.KeepAliveTimeout = TimeSpan.FromMinutes(2);
options.Limits.RequestHeadersTimeout = TimeSpan.FromSeconds(30);
});
return builder;
}
}