mirror of
https://github.com/whoswhip/Sharpbin.git
synced 2026-12-06 02:48:43 +00:00
feat: true total paste size; always map the openapi route
style: format via csharpier
This commit is contained in:
@@ -72,7 +72,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<p class="text-sm text-neutral-400">Total Storage Used</p>
|
<p class="text-sm text-neutral-400">Total Storage Used</p>
|
||||||
<p class="text-2xl font-bold">{formatBytes(stats.pastes.totalSizeInBytes)}</p>
|
<p class="text-2xl font-bold" use:tooltip={[formatBytes(stats.pastes.trueTotalSizeInBytes), true]}>{formatBytes(stats.pastes.totalSizeInBytes)}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-center space-x-4 rounded-lg bg-neutral-800 p-4">
|
<div class="flex items-center space-x-4 rounded-lg bg-neutral-800 p-4">
|
||||||
|
|||||||
+198
-145
@@ -1,3 +1,6 @@
|
|||||||
|
using System.Text;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
using System.Threading.RateLimiting;
|
||||||
using Microsoft.AspNetCore.Authentication.JwtBearer;
|
using Microsoft.AspNetCore.Authentication.JwtBearer;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.DataProtection;
|
using Microsoft.AspNetCore.DataProtection;
|
||||||
@@ -11,9 +14,6 @@ using SharpbinV3.Server.Services;
|
|||||||
using SharpbinV3.Server.Services.Verification;
|
using SharpbinV3.Server.Services.Verification;
|
||||||
using SharpbinV3.Server.Services.Verification.Providers;
|
using SharpbinV3.Server.Services.Verification.Providers;
|
||||||
using SharpbinV3.Server.Settings;
|
using SharpbinV3.Server.Settings;
|
||||||
using System.Text;
|
|
||||||
using System.Text.Json.Serialization;
|
|
||||||
using System.Threading.RateLimiting;
|
|
||||||
|
|
||||||
namespace SharpbinV3.Server
|
namespace SharpbinV3.Server
|
||||||
{
|
{
|
||||||
@@ -25,11 +25,13 @@ namespace SharpbinV3.Server
|
|||||||
|
|
||||||
// Add services to the container.
|
// Add services to the container.
|
||||||
|
|
||||||
builder.Services.AddControllers()
|
builder
|
||||||
|
.Services.AddControllers()
|
||||||
.AddJsonOptions(options =>
|
.AddJsonOptions(options =>
|
||||||
{
|
{
|
||||||
options.JsonSerializerOptions.ReferenceHandler = ReferenceHandler.IgnoreCycles;
|
options.JsonSerializerOptions.ReferenceHandler = ReferenceHandler.IgnoreCycles;
|
||||||
options.JsonSerializerOptions.DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull;
|
options.JsonSerializerOptions.DefaultIgnoreCondition =
|
||||||
|
JsonIgnoreCondition.WhenWritingNull;
|
||||||
});
|
});
|
||||||
// Learn more about configuring OpenAPI at https://aka.ms/aspnet/openapi
|
// Learn more about configuring OpenAPI at https://aka.ms/aspnet/openapi
|
||||||
builder.Services.AddOpenApi();
|
builder.Services.AddOpenApi();
|
||||||
@@ -48,150 +50,185 @@ namespace SharpbinV3.Server
|
|||||||
builder.Services.AddHttpClient<IVerificationProvider, TurnstileVerificationProvider>();
|
builder.Services.AddHttpClient<IVerificationProvider, TurnstileVerificationProvider>();
|
||||||
builder.Services.AddScoped<ReportService>();
|
builder.Services.AddScoped<ReportService>();
|
||||||
builder.Services.AddMemoryCache();
|
builder.Services.AddMemoryCache();
|
||||||
|
builder.Services.AddEndpointsApiExplorer();
|
||||||
|
|
||||||
builder.Services.AddHealthChecks()
|
builder.Services.AddHealthChecks().AddDbContextCheck<AppDbContext>("Database");
|
||||||
.AddDbContextCheck<AppDbContext>("Database");
|
|
||||||
|
|
||||||
builder.Services.AddOptions<PasteSettings>()
|
builder
|
||||||
|
.Services.AddOptions<PasteSettings>()
|
||||||
.Bind(builder.Configuration.GetSection("PasteSettings"))
|
.Bind(builder.Configuration.GetSection("PasteSettings"))
|
||||||
.ValidateDataAnnotations()
|
.ValidateDataAnnotations()
|
||||||
.ValidateOnStart();
|
.ValidateOnStart();
|
||||||
builder.Services.AddOptions<JWTSettings>()
|
builder
|
||||||
|
.Services.AddOptions<JWTSettings>()
|
||||||
.Bind(builder.Configuration.GetSection("JwtSettings"))
|
.Bind(builder.Configuration.GetSection("JwtSettings"))
|
||||||
.ValidateDataAnnotations()
|
.ValidateDataAnnotations()
|
||||||
.ValidateOnStart();
|
.ValidateOnStart();
|
||||||
builder.Services.Configure<AuthSettings>(builder.Configuration.GetSection("AuthSettings"));
|
builder.Services.Configure<AuthSettings>(
|
||||||
|
builder.Configuration.GetSection("AuthSettings")
|
||||||
|
);
|
||||||
|
|
||||||
builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
|
builder
|
||||||
|
.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
|
||||||
.AddJwtBearer();
|
.AddJwtBearer();
|
||||||
|
|
||||||
builder.Services.AddOptions<JwtBearerOptions>(JwtBearerDefaults.AuthenticationScheme)
|
builder
|
||||||
.Configure<IOptions<JWTSettings>>((options, jwtSettings) =>
|
.Services.AddOptions<JwtBearerOptions>(JwtBearerDefaults.AuthenticationScheme)
|
||||||
{
|
.Configure<IOptions<JWTSettings>>(
|
||||||
var settings = jwtSettings.Value;
|
(options, jwtSettings) =>
|
||||||
var key = Encoding.UTF8.GetBytes(settings.Secret);
|
|
||||||
|
|
||||||
options.SaveToken = true;
|
|
||||||
options.TokenValidationParameters = new TokenValidationParameters
|
|
||||||
{
|
{
|
||||||
ValidateIssuerSigningKey = true,
|
var settings = jwtSettings.Value;
|
||||||
IssuerSigningKey = new SymmetricSecurityKey(key),
|
var key = Encoding.UTF8.GetBytes(settings.Secret);
|
||||||
|
|
||||||
ValidateIssuer = true,
|
options.SaveToken = true;
|
||||||
ValidIssuer = settings.Issuer,
|
options.TokenValidationParameters = new TokenValidationParameters
|
||||||
|
{
|
||||||
|
ValidateIssuerSigningKey = true,
|
||||||
|
IssuerSigningKey = new SymmetricSecurityKey(key),
|
||||||
|
|
||||||
ValidateAudience = true,
|
ValidateIssuer = true,
|
||||||
ValidAudience = settings.Audience,
|
ValidIssuer = settings.Issuer,
|
||||||
|
|
||||||
RequireExpirationTime = true,
|
ValidateAudience = true,
|
||||||
ValidateLifetime = true,
|
ValidAudience = settings.Audience,
|
||||||
ClockSkew = TimeSpan.Zero,
|
|
||||||
|
|
||||||
RequireSignedTokens = true,
|
RequireExpirationTime = true,
|
||||||
ValidAlgorithms = [SecurityAlgorithms.HmacSha256]
|
ValidateLifetime = true,
|
||||||
};
|
ClockSkew = TimeSpan.Zero,
|
||||||
});
|
|
||||||
|
|
||||||
builder.Services.AddAuthorizationBuilder()
|
RequireSignedTokens = true,
|
||||||
.AddPolicy("NotBanned", policy =>
|
ValidAlgorithms = [SecurityAlgorithms.HmacSha256],
|
||||||
policy.Requirements.Add(new NotBannedRequirement()));
|
};
|
||||||
builder.Services.AddAuthorizationBuilder()
|
}
|
||||||
.AddPolicy("AuthAndNotBanned", policy =>
|
);
|
||||||
policy.Requirements.Add(new NotBannedRequirement()));
|
|
||||||
|
builder
|
||||||
|
.Services.AddAuthorizationBuilder()
|
||||||
|
.AddPolicy(
|
||||||
|
"NotBanned",
|
||||||
|
policy => policy.Requirements.Add(new NotBannedRequirement())
|
||||||
|
);
|
||||||
|
builder
|
||||||
|
.Services.AddAuthorizationBuilder()
|
||||||
|
.AddPolicy(
|
||||||
|
"AuthAndNotBanned",
|
||||||
|
policy => policy.Requirements.Add(new NotBannedRequirement())
|
||||||
|
);
|
||||||
builder.Services.AddSingleton<IAuthorizationHandler>(new NotBannedHandler(false));
|
builder.Services.AddSingleton<IAuthorizationHandler>(new NotBannedHandler(false));
|
||||||
builder.Services.AddSingleton<IAuthorizationHandler>(new NotBannedHandler(true));
|
builder.Services.AddSingleton<IAuthorizationHandler>(new NotBannedHandler(true));
|
||||||
|
|
||||||
|
|
||||||
builder.Services.AddRateLimiter(options =>
|
builder.Services.AddRateLimiter(options =>
|
||||||
{
|
{
|
||||||
options.AddPolicy("Sliding", httpContext =>
|
options.AddPolicy(
|
||||||
RateLimitPartition.GetSlidingWindowLimiter(httpContext.GetRequestIP(), _ => new SlidingWindowRateLimiterOptions
|
"Sliding",
|
||||||
{
|
httpContext =>
|
||||||
Window = TimeSpan.FromSeconds(10),
|
RateLimitPartition.GetSlidingWindowLimiter(
|
||||||
PermitLimit = 10,
|
httpContext.GetRequestIP(),
|
||||||
QueueLimit = 2,
|
_ => new SlidingWindowRateLimiterOptions
|
||||||
SegmentsPerWindow = 5,
|
{
|
||||||
QueueProcessingOrder = QueueProcessingOrder.OldestFirst,
|
Window = TimeSpan.FromSeconds(10),
|
||||||
}
|
PermitLimit = 10,
|
||||||
));
|
QueueLimit = 2,
|
||||||
|
SegmentsPerWindow = 5,
|
||||||
|
QueueProcessingOrder = QueueProcessingOrder.OldestFirst,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
options.AddPolicy("Strict", httpContext =>
|
options.AddPolicy(
|
||||||
RateLimitPartition.GetTokenBucketLimiter(httpContext.GetRequestIP(), _ => new TokenBucketRateLimiterOptions
|
"Strict",
|
||||||
{
|
httpContext =>
|
||||||
TokenLimit = 5,
|
RateLimitPartition.GetTokenBucketLimiter(
|
||||||
QueueLimit = 0,
|
httpContext.GetRequestIP(),
|
||||||
TokensPerPeriod = 1,
|
_ => new TokenBucketRateLimiterOptions
|
||||||
ReplenishmentPeriod = TimeSpan.FromSeconds(30),
|
{
|
||||||
AutoReplenishment = true,
|
TokenLimit = 5,
|
||||||
QueueProcessingOrder = QueueProcessingOrder.OldestFirst,
|
QueueLimit = 0,
|
||||||
}
|
TokensPerPeriod = 1,
|
||||||
));
|
ReplenishmentPeriod = TimeSpan.FromSeconds(30),
|
||||||
|
AutoReplenishment = true,
|
||||||
|
QueueProcessingOrder = QueueProcessingOrder.OldestFirst,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
options.AddPolicy("Sensitive", httpContext =>
|
options.AddPolicy(
|
||||||
RateLimitPartition.GetTokenBucketLimiter(httpContext.GetRequestIP(), _ => new TokenBucketRateLimiterOptions
|
"Sensitive",
|
||||||
{
|
httpContext =>
|
||||||
TokenLimit = 3,
|
RateLimitPartition.GetTokenBucketLimiter(
|
||||||
QueueLimit = 0,
|
httpContext.GetRequestIP(),
|
||||||
TokensPerPeriod = 1,
|
_ => new TokenBucketRateLimiterOptions
|
||||||
ReplenishmentPeriod = TimeSpan.FromMinutes(1),
|
{
|
||||||
AutoReplenishment = true,
|
TokenLimit = 3,
|
||||||
QueueProcessingOrder = QueueProcessingOrder.OldestFirst,
|
QueueLimit = 0,
|
||||||
}
|
TokensPerPeriod = 1,
|
||||||
));
|
ReplenishmentPeriod = TimeSpan.FromMinutes(1),
|
||||||
|
AutoReplenishment = true,
|
||||||
|
QueueProcessingOrder = QueueProcessingOrder.OldestFirst,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
options.AddPolicy("NoLimit", _ => RateLimitPartition.GetNoLimiter(0));
|
options.AddPolicy("NoLimit", _ => RateLimitPartition.GetNoLimiter(0));
|
||||||
|
|
||||||
options.GlobalLimiter = PartitionedRateLimiter.Create<HttpContext, string>(httpContext =>
|
options.GlobalLimiter = PartitionedRateLimiter.Create<HttpContext, string>(
|
||||||
{
|
httpContext =>
|
||||||
var remoteIp = httpContext.GetRequestIP();
|
|
||||||
|
|
||||||
return RateLimitPartition.GetFixedWindowLimiter(remoteIp, _ => new FixedWindowRateLimiterOptions
|
|
||||||
{
|
{
|
||||||
PermitLimit = 100,
|
var remoteIp = httpContext.GetRequestIP();
|
||||||
Window = TimeSpan.FromMinutes(1),
|
|
||||||
QueueProcessingOrder = QueueProcessingOrder.OldestFirst,
|
return RateLimitPartition.GetFixedWindowLimiter(
|
||||||
QueueLimit = 0
|
remoteIp,
|
||||||
});
|
_ => new FixedWindowRateLimiterOptions
|
||||||
});
|
{
|
||||||
|
PermitLimit = 100,
|
||||||
|
Window = TimeSpan.FromMinutes(1),
|
||||||
|
QueueProcessingOrder = QueueProcessingOrder.OldestFirst,
|
||||||
|
QueueLimit = 0,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
options.RejectionStatusCode = StatusCodes.Status429TooManyRequests;
|
options.RejectionStatusCode = StatusCodes.Status429TooManyRequests;
|
||||||
options.OnRejected = async (context, cancellationToken) =>
|
options.OnRejected = async (context, cancellationToken) =>
|
||||||
{
|
{
|
||||||
await context.HttpContext.Response.WriteAsJsonAsync(new
|
await context.HttpContext.Response.WriteAsJsonAsync(
|
||||||
{
|
new
|
||||||
success = false,
|
{
|
||||||
Message = "Too many requests. Please try again later."
|
success = false,
|
||||||
}, cancellationToken: cancellationToken);
|
Message = "Too many requests. Please try again later.",
|
||||||
|
},
|
||||||
|
cancellationToken: cancellationToken
|
||||||
|
);
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
builder.Services.AddOutputCache(options =>
|
builder.Services.AddOutputCache(options =>
|
||||||
{
|
{
|
||||||
options.AddPolicy("1Day", builder =>
|
options.AddPolicy(
|
||||||
{
|
"1Day",
|
||||||
builder.Expire(TimeSpan.FromDays(1));
|
builder =>
|
||||||
});
|
{
|
||||||
|
builder.Expire(TimeSpan.FromDays(1));
|
||||||
|
}
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
builder.Services.AddCors(o =>
|
builder.Services.AddCors(o =>
|
||||||
{
|
{
|
||||||
o.AddDefaultPolicy(p =>
|
o.AddDefaultPolicy(p =>
|
||||||
p.WithOrigins("http://localhost:5173")
|
p.WithOrigins("http://localhost:5173").AllowAnyHeader().AllowAnyMethod()
|
||||||
.AllowAnyHeader()
|
);
|
||||||
.AllowAnyMethod());
|
|
||||||
});
|
});
|
||||||
|
|
||||||
builder.Services.AddDataProtection()
|
builder
|
||||||
|
.Services.AddDataProtection()
|
||||||
.PersistKeysToFileSystem(GetDataProtectionKeyDirectory(builder.Environment))
|
.PersistKeysToFileSystem(GetDataProtectionKeyDirectory(builder.Environment))
|
||||||
.SetApplicationName("SharpbinV3");
|
.SetApplicationName("SharpbinV3");
|
||||||
|
|
||||||
var app = builder.Build();
|
var app = builder.Build();
|
||||||
app.UseRateLimiter();
|
app.UseRateLimiter();
|
||||||
|
|
||||||
// Configure the HTTP request pipeline.
|
app.MapOpenApi();
|
||||||
if (app.Environment.IsDevelopment())
|
|
||||||
{
|
|
||||||
app.MapOpenApi();
|
|
||||||
}
|
|
||||||
|
|
||||||
app.UseHttpsRedirection();
|
app.UseHttpsRedirection();
|
||||||
app.UseCors();
|
app.UseCors();
|
||||||
@@ -209,7 +246,8 @@ namespace SharpbinV3.Server
|
|||||||
db.Database.Migrate();
|
db.Database.Migrate();
|
||||||
|
|
||||||
// this is temporary since the migration doesnt seem to work properly
|
// this is temporary since the migration doesnt seem to work properly
|
||||||
db.Database.ExecuteSql($"""
|
db.Database.ExecuteSql(
|
||||||
|
$"""
|
||||||
CREATE TRIGGER IF NOT EXISTS Users_UID_AutoIncrement
|
CREATE TRIGGER IF NOT EXISTS Users_UID_AutoIncrement
|
||||||
AFTER INSERT ON Users
|
AFTER INSERT ON Users
|
||||||
BEGIN
|
BEGIN
|
||||||
@@ -219,61 +257,76 @@ namespace SharpbinV3.Server
|
|||||||
)
|
)
|
||||||
WHERE rowid = NEW.rowid AND NEW.UID IS NULL;
|
WHERE rowid = NEW.rowid AND NEW.UID IS NULL;
|
||||||
END;
|
END;
|
||||||
""");
|
"""
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
app.MapHealthChecks("/health");
|
app.MapHealthChecks("/health");
|
||||||
|
|
||||||
app.MapGet("/api/stats", async (AppDbContext db) =>
|
app.MapGet(
|
||||||
{
|
"/api/stats",
|
||||||
var now = DateTimeOffset.UtcNow;
|
async (AppDbContext db) =>
|
||||||
var todayStart = new DateTimeOffset(now.Year, now.Month, now.Day, 0, 0, 0, TimeSpan.Zero);
|
|
||||||
var sevenDaysAgo = todayStart.AddDays(-6).ToUnixTimeMilliseconds();
|
|
||||||
|
|
||||||
var pasteCount = await db.Pastes.CountAsync();
|
|
||||||
var userCount = await db.Users.CountAsync();
|
|
||||||
var totalPasteSize = await db.Pastes.SumAsync(p => p.Size);
|
|
||||||
|
|
||||||
var dailyCounts = await db.Pastes
|
|
||||||
.Where(p => p.CreatedAt >= sevenDaysAgo)
|
|
||||||
.GroupBy(p => p.CreatedAt / 86400000)
|
|
||||||
.Select(g => new { Day = g.Key, Count = g.Count() })
|
|
||||||
.ToDictionaryAsync(x => x.Day, x => x.Count);
|
|
||||||
|
|
||||||
var dailyStats = new List<object>();
|
|
||||||
var pasteCountWeek = 0;
|
|
||||||
|
|
||||||
for (int i = 6; i >= 0; i--)
|
|
||||||
{
|
|
||||||
var dayTs = todayStart.AddDays(-i).ToUnixTimeMilliseconds();
|
|
||||||
dailyCounts.TryGetValue(dayTs / 86400000, out var count);
|
|
||||||
|
|
||||||
dailyStats.Add(new { date = dayTs, count });
|
|
||||||
pasteCountWeek += count;
|
|
||||||
}
|
|
||||||
|
|
||||||
return Results.Ok(new
|
|
||||||
{
|
|
||||||
success = true,
|
|
||||||
stats = new
|
|
||||||
{
|
{
|
||||||
pastes = new
|
var now = DateTimeOffset.UtcNow;
|
||||||
|
var todayStart = new DateTimeOffset(
|
||||||
|
now.Year,
|
||||||
|
now.Month,
|
||||||
|
now.Day,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
TimeSpan.Zero
|
||||||
|
);
|
||||||
|
var sevenDaysAgo = todayStart.AddDays(-6).ToUnixTimeMilliseconds();
|
||||||
|
|
||||||
|
var pasteCount = await db.Pastes.CountAsync();
|
||||||
|
var userCount = await db.Users.CountAsync();
|
||||||
|
var totalPasteSize = await db.Pastes.SumAsync(p => p.Size);
|
||||||
|
var trueTotalPasteSize = await db.Pastes.SumAsync(p => p.TrueSize);
|
||||||
|
|
||||||
|
var dailyCounts = await db
|
||||||
|
.Pastes.Where(p => p.CreatedAt >= sevenDaysAgo)
|
||||||
|
.GroupBy(p => p.CreatedAt / 86400000)
|
||||||
|
.Select(g => new { Day = g.Key, Count = g.Count() })
|
||||||
|
.ToDictionaryAsync(x => x.Day, x => x.Count);
|
||||||
|
|
||||||
|
var dailyStats = new List<object>();
|
||||||
|
var pasteCountWeek = 0;
|
||||||
|
|
||||||
|
for (int i = 6; i >= 0; i--)
|
||||||
{
|
{
|
||||||
total = pasteCount,
|
var dayTs = todayStart.AddDays(-i).ToUnixTimeMilliseconds();
|
||||||
past7Days = pasteCountWeek,
|
dailyCounts.TryGetValue(dayTs / 86400000, out var count);
|
||||||
totalSizeInBytes = totalPasteSize,
|
|
||||||
daily = dailyStats
|
dailyStats.Add(new { date = dayTs, count });
|
||||||
},
|
pasteCountWeek += count;
|
||||||
users = new
|
|
||||||
{
|
|
||||||
total = userCount
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return Results.Ok(
|
||||||
|
new
|
||||||
|
{
|
||||||
|
success = true,
|
||||||
|
stats = new
|
||||||
|
{
|
||||||
|
pastes = new
|
||||||
|
{
|
||||||
|
total = pasteCount,
|
||||||
|
past7Days = pasteCountWeek,
|
||||||
|
totalSizeInBytes = totalPasteSize,
|
||||||
|
trueTotalSizeInBytes = trueTotalPasteSize,
|
||||||
|
daily = dailyStats,
|
||||||
|
},
|
||||||
|
users = new { total = userCount },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
});
|
)
|
||||||
}).CacheOutput(policy => policy.Expire(TimeSpan.FromHours(6)).Tag("stats"));
|
.CacheOutput(policy => policy.Expire(TimeSpan.FromHours(6)).Tag("stats"));
|
||||||
|
|
||||||
app.Run();
|
app.Run();
|
||||||
}
|
}
|
||||||
|
|
||||||
static DirectoryInfo GetDataProtectionKeyDirectory(IHostEnvironment env)
|
static DirectoryInfo GetDataProtectionKeyDirectory(IHostEnvironment env)
|
||||||
{
|
{
|
||||||
var overridepath = Environment.GetEnvironmentVariable("DATA_PROTECTION_KEY_PATH");
|
var overridepath = Environment.GetEnvironmentVariable("DATA_PROTECTION_KEY_PATH");
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net10.0</TargetFramework>
|
<TargetFramework>net10.0</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
@@ -26,10 +25,19 @@
|
|||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="10.0.1" />
|
<PackageReference Include="Microsoft.Extensions.ApiDescription.Server" Version="10.0.1">
|
||||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.23.0" />
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference
|
||||||
|
Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore"
|
||||||
|
Version="10.0.1"
|
||||||
|
/>
|
||||||
|
<PackageReference
|
||||||
|
Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets"
|
||||||
|
Version="1.23.0"
|
||||||
|
/>
|
||||||
<PackageReference Include="Otp.NET" Version="1.4.1" />
|
<PackageReference Include="Otp.NET" Version="1.4.1" />
|
||||||
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.15.0" />
|
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.15.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
Reference in New Issue
Block a user