Add forwarded headers
All checks were successful
Build, Push and Run Container / build (push) Successful in 29s

This commit is contained in:
2025-10-15 19:32:23 +02:00
parent 6ac6d05f5f
commit 84dc22f324
2 changed files with 15 additions and 1 deletions

View File

@@ -39,6 +39,20 @@ builder.Services.AddHttpClient().AddHttpClient("InsecureClient")
HttpClientHandler.DangerousAcceptAnyServerCertificateValidator HttpClientHandler.DangerousAcceptAnyServerCertificateValidator
}); });
// If you know your proxy IP(s), specify them for security.
builder.Services.Configure<ForwardedHeadersOptions>(options =>
{
options.ForwardedHeaders =
ForwardedHeaders.XForwardedFor |
ForwardedHeaders.XForwardedProto |
ForwardedHeaders.XForwardedHost;
// Trust specific proxy or network:
options.KnownProxies.Clear();
options.KnownNetworks.Clear();
options.ForwardLimit = null; // but prefer being explicit when possible
});
builder.Services builder.Services
.AddAuthentication(o => .AddAuthentication(o =>
{ {

View File

@@ -156,7 +156,7 @@ public class MessageProcessorConfiguration
public Dictionary<string, string> VinNotifications { get; set; } = new Dictionary<string, string>() public Dictionary<string, string> VinNotifications { get; set; } = new Dictionary<string, string>()
{ {
{ "5YJ3E7EB7KF291652", "u2ouaqqu5gd9f1bq3rmrtwriumaffu"}, /*Zoli*/ { "5YJ3E7EB7KF291652", "u2ouaqqu5gd9f1bq3rmrtwriumaffu"}, /*Zoli*/
{ "LRW3E7EK4NC482668", "udbz5g2hi24m4wcanx44qqkwf7r1c7" } { "LRW3E7EK4NC482668", "udbz5g2hi24m4wcanx44qqkwf7r1c7" /*Nagy Balázs*/ }
}; };
} }