🐛 Fix gateway IP detection issue
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
using System.Threading.RateLimiting;
|
||||
using DysonNetwork.Shared.Http;
|
||||
using Microsoft.AspNetCore.RateLimiting;
|
||||
using Yarp.ReverseProxy.Configuration;
|
||||
using Microsoft.AspNetCore.HttpOverrides;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
@@ -152,6 +152,11 @@ builder.Services.AddControllers();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
app.UseForwardedHeaders(new ForwardedHeadersOptions
|
||||
{
|
||||
ForwardedHeaders = ForwardedHeaders.All,
|
||||
});
|
||||
|
||||
app.UseCors();
|
||||
|
||||
app.UseRateLimiter();
|
||||
|
Reference in New Issue
Block a user