🐛 Fix bugs

This commit is contained in:
2025-04-23 00:30:25 +08:00
parent c43ff6be7b
commit 31db3d5388
6 changed files with 39 additions and 11 deletions

View File

@ -26,6 +26,7 @@ using File = System.IO.File;
var builder = WebApplication.CreateBuilder(args);
builder.Host.UseContentRoot(Directory.GetCurrentDirectory());
builder.WebHost.ConfigureKestrel(options => options.Limits.MaxRequestBodySize = long.MaxValue);
// Add services to the container.
@ -166,6 +167,8 @@ app.UseForwardedHeaders(new ForwardedHeadersOptions
app.UseCors(opts =>
opts.SetIsOriginAllowed(_ => true)
.WithExposedHeaders("X-Total")
.WithHeaders("X-Total")
.AllowCredentials()
.AllowAnyHeader()
.AllowAnyMethod()