Add support for forwarding headers options

This commit is contained in:
2026-06-07 20:18:33 +02:00
parent a94c72861a
commit fc8903c04e

View File

@@ -0,0 +1,16 @@
namespace FrameProcessor.Configuration;
/// <summary>
/// Bound from the <c>ForwardedHeaders</c> section of <c>appsettings.json</c>.
/// Controls which upstream proxies are trusted to set <c>X-Forwarded-*</c> headers.
/// Empty lists trust any upstream — only safe when the listening port is not
/// publicly reachable (e.g. Docker network).
/// </summary>
public sealed class ForwardedHeadersOptions
{
public const string SectionName = "ForwardedHeaders";
public List<string> KnownNetworks { get; set; } = new();
public List<string> KnownProxies { get; set; } = new();
}