Skip to content

Commit

Permalink
Respect X-Forward headers to know the actual protocol being used
Browse files Browse the repository at this point in the history
  • Loading branch information
Foxocube committed Jan 1, 2025
1 parent 6b127c0 commit 01fd603
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions MediaFeeder/MediaFeeder/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using OpenTelemetry.Metrics;
using OpenTelemetry.Trace;
using MediaFeeder.Services;
using Microsoft.AspNetCore.HttpOverrides;

var builder = WebApplication.CreateBuilder(args);

Expand Down Expand Up @@ -141,6 +142,11 @@
app.UseHsts();
}

app.UseForwardedHeaders(new ForwardedHeadersOptions
{
ForwardedHeaders = ForwardedHeaders.All,
});

app.UseHealthChecks("/healthz");
app.MapPrometheusScrapingEndpoint();

Expand Down

0 comments on commit 01fd603

Please sign in to comment.