Skip to content

Commit

Permalink
feat: allow configuration of forward limit
Browse files Browse the repository at this point in the history
  • Loading branch information
xfoxfu committed Sep 22, 2024
1 parent fcb8ede commit 093a93d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Net.Vatprc.Uniapi/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
{
options.ForwardedHeaders =
ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto;
options.ForwardLimit =
builder.Configuration.GetSection("ForwardedHeadersOptions").GetValue("ForwardLimit", 1);
foreach (var knownNetwork in builder.Configuration
.GetSection("ForwardedHeadersOptions:KnownNetworks").GetChildren())
{
Expand Down

0 comments on commit 093a93d

Please sign in to comment.