Вторая часть по кэшу
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="10.1.5" />
|
||||
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.16.0" />
|
||||
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="8.16.0" />
|
||||
<PackageReference Include="DKNet.AspCore.Idempotency" Version="1.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -141,6 +141,7 @@ builder.Services.AddRouting(options =>
|
||||
|
||||
builder.Services.AddMemoryCache();
|
||||
builder.Services.AddHttpClient();
|
||||
builder.Services.AddIdempotency(); // DKNet.AspCore.Idempotency DI registration
|
||||
|
||||
builder.Services.ConfigureHttpJsonOptions(options =>
|
||||
{
|
||||
@@ -243,7 +244,7 @@ if (app.Environment.IsDevelopment())
|
||||
// Не раздаем статические файлы, так как теперь используем MinIO
|
||||
|
||||
app.UseAuthentication();
|
||||
app.UseIdempotencyMiddleware();
|
||||
app.UseIdempotency(); // DKNet.AspCore.Idempotency middleware
|
||||
app.UseAuthorization();
|
||||
|
||||
// Регистрация эндпоинтов
|
||||
|
||||
Reference in New Issue
Block a user