Add support for forwarding headers options
This commit is contained in:
16
src/FrameProcessor/Configuration/ForwardedHeadersOptions.cs
Normal file
16
src/FrameProcessor/Configuration/ForwardedHeadersOptions.cs
Normal 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();
|
||||
}
|
||||
Reference in New Issue
Block a user