Skip to content

Commit

Permalink
Fixed Forward Headers
Browse files Browse the repository at this point in the history
  • Loading branch information
JPVenson authored Jul 27, 2024
1 parent ab8804a commit 407474d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Jellyfin.HardwareVisualizer/Server/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
using Octokit.Internal;
using ProductHeaderValue = Octokit.ProductHeaderValue;
using System.Net;
using Microsoft.AspNetCore.HttpOverrides;

namespace Jellyfin.HardwareVisualizer.Server;

Expand Down Expand Up @@ -79,13 +80,12 @@ string GetConnectionString()
var hostingOptions = builder.Configuration.Get<HostingOptions>();
options.ForwardLimit = 2;
options.ForwardedHeaders = ForwardedHeaders.XForwardedFor;
foreach(var proxy in hostingOptions.KnownProxies ?? [])
{
options.KnownProxies.Add(IPAddress.Parse(proxy));
}
// options.KnownProxies.Add(IPAddress.Parse("172.18.0.2"));
// options.KnownProxies.Add(IPAddress.Parse("172.19.0.9"));
options.ForwardedForHeaderName = "X-Forwarded-For";
});

Expand Down

0 comments on commit 407474d

Please sign in to comment.