mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-13 14:14:15 +01:00
add blocking detection nuget
This commit is contained in:
parent
78543d0fc2
commit
1a22846eea
4 changed files with 6 additions and 26 deletions
|
|
@ -9,6 +9,7 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="AspNetCoreRateLimit" Version="4.0.2" />
|
||||
<PackageReference Include="Bazinga.AspNetCore.Authentication.Basic" Version="2.0.1" />
|
||||
<PackageReference Include="Ben.BlockingDetector" Version="0.0.4" />
|
||||
<PackageReference Include="Discord.Net" Version="3.7.2" />
|
||||
<PackageReference Include="EFCore.NamingConventions" Version="6.0.0" />
|
||||
<PackageReference Include="Karambolo.Extensions.Logging.File" Version="3.3.1" />
|
||||
|
|
|
|||
|
|
@ -1,13 +1,3 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"mssql1": {
|
||||
"type": "mssql",
|
||||
"connectionId": "ConnectionStrings:DefaultConnection",
|
||||
"dynamicId": null
|
||||
},
|
||||
"secrets1": {
|
||||
"type": "secrets",
|
||||
"connectionId": null
|
||||
}
|
||||
}
|
||||
"dependencies": {}
|
||||
}
|
||||
|
|
@ -1,16 +1,3 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"mssql1": {
|
||||
"secretStore": "LocalSecretsFile",
|
||||
"type": "mssql.onprem",
|
||||
"connectionId": "ConnectionStrings:DefaultConnection",
|
||||
"dynamicId": null
|
||||
},
|
||||
"secrets1": {
|
||||
"secretStore": null,
|
||||
"resourceId": null,
|
||||
"type": "secrets.user",
|
||||
"connectionId": null
|
||||
}
|
||||
}
|
||||
"dependencies": {}
|
||||
}
|
||||
|
|
@ -17,6 +17,7 @@ using Microsoft.AspNetCore.Authorization;
|
|||
using MareSynchronosServer.Discord;
|
||||
using AspNetCoreRateLimit;
|
||||
using MareSynchronosServer.Throttling;
|
||||
using Ben.Diagnostics;
|
||||
|
||||
namespace MareSynchronosServer
|
||||
{
|
||||
|
|
@ -48,11 +49,11 @@ namespace MareSynchronosServer
|
|||
|
||||
services.AddDbContextPool<MareDbContext>(options =>
|
||||
{
|
||||
options.EnableThreadSafetyChecks(false);
|
||||
options.UseNpgsql(Configuration.GetConnectionString("DefaultConnection"), builder =>
|
||||
{
|
||||
builder.MigrationsHistoryTable("_efmigrationshistory", "public");
|
||||
}).UseSnakeCaseNamingConvention();
|
||||
options.EnableThreadSafetyChecks(false);
|
||||
}, Configuration.GetValue("DbContextPoolSize", 1024));
|
||||
|
||||
services.AddHostedService<CleanupService>();
|
||||
|
|
@ -81,6 +82,7 @@ namespace MareSynchronosServer
|
|||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
||||
{
|
||||
app.UseBlockingDetection();
|
||||
|
||||
if (env.IsDevelopment())
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue