🐛 Remove duplicate CORS
This commit is contained in:
@@ -18,15 +18,6 @@ public static class ApplicationBuilderExtensions
|
|||||||
app.UseAuthorization();
|
app.UseAuthorization();
|
||||||
app.MapControllers();
|
app.MapControllers();
|
||||||
|
|
||||||
app.UseCors(opts =>
|
|
||||||
opts.SetIsOriginAllowed(_ => true)
|
|
||||||
.WithExposedHeaders("*")
|
|
||||||
.WithHeaders("*")
|
|
||||||
.AllowCredentials()
|
|
||||||
.AllowAnyHeader()
|
|
||||||
.AllowAnyMethod()
|
|
||||||
);
|
|
||||||
|
|
||||||
app.MapTus("/api/tus", _ => Task.FromResult(TusService.BuildConfiguration(tusStore, app.Configuration)));
|
app.MapTus("/api/tus", _ => Task.FromResult(TusService.BuildConfiguration(tusStore, app.Configuration)));
|
||||||
|
|
||||||
return app;
|
return app;
|
||||||
|
@@ -1,4 +1,3 @@
|
|||||||
using System.Net;
|
|
||||||
using DysonNetwork.Pass.Account;
|
using DysonNetwork.Pass.Account;
|
||||||
using DysonNetwork.Pass.Auth;
|
using DysonNetwork.Pass.Auth;
|
||||||
using DysonNetwork.Pass.Credit;
|
using DysonNetwork.Pass.Credit;
|
||||||
@@ -6,8 +5,6 @@ using DysonNetwork.Pass.Leveling;
|
|||||||
using DysonNetwork.Pass.Permission;
|
using DysonNetwork.Pass.Permission;
|
||||||
using DysonNetwork.Pass.Wallet;
|
using DysonNetwork.Pass.Wallet;
|
||||||
using DysonNetwork.Shared.Http;
|
using DysonNetwork.Shared.Http;
|
||||||
using Microsoft.AspNetCore.HttpOverrides;
|
|
||||||
using Microsoft.Extensions.FileProviders;
|
|
||||||
using Prometheus;
|
using Prometheus;
|
||||||
|
|
||||||
namespace DysonNetwork.Pass.Startup;
|
namespace DysonNetwork.Pass.Startup;
|
||||||
@@ -26,15 +23,6 @@ public static class ApplicationConfiguration
|
|||||||
|
|
||||||
app.ConfigureForwardedHeaders(configuration);
|
app.ConfigureForwardedHeaders(configuration);
|
||||||
|
|
||||||
app.UseCors(opts =>
|
|
||||||
opts.SetIsOriginAllowed(_ => true)
|
|
||||||
.WithExposedHeaders("*")
|
|
||||||
.WithHeaders("*")
|
|
||||||
.AllowCredentials()
|
|
||||||
.AllowAnyHeader()
|
|
||||||
.AllowAnyMethod()
|
|
||||||
);
|
|
||||||
|
|
||||||
app.UseWebSockets();
|
app.UseWebSockets();
|
||||||
app.UseRateLimiter();
|
app.UseRateLimiter();
|
||||||
app.UseAuthentication();
|
app.UseAuthentication();
|
||||||
@@ -60,4 +48,4 @@ public static class ApplicationConfiguration
|
|||||||
|
|
||||||
return app;
|
return app;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user