From 01fd60399d53ef37c3e53122f6575a16a3ef2da1 Mon Sep 17 00:00:00 2001 From: Foxocube Date: Wed, 1 Jan 2025 00:37:37 +0000 Subject: [PATCH] Respect X-Forward headers to know the actual protocol being used --- MediaFeeder/MediaFeeder/Program.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/MediaFeeder/MediaFeeder/Program.cs b/MediaFeeder/MediaFeeder/Program.cs index 3b1a0c0..25bc844 100644 --- a/MediaFeeder/MediaFeeder/Program.cs +++ b/MediaFeeder/MediaFeeder/Program.cs @@ -14,6 +14,7 @@ using OpenTelemetry.Metrics; using OpenTelemetry.Trace; using MediaFeeder.Services; +using Microsoft.AspNetCore.HttpOverrides; var builder = WebApplication.CreateBuilder(args); @@ -141,6 +142,11 @@ app.UseHsts(); } +app.UseForwardedHeaders(new ForwardedHeadersOptions +{ + ForwardedHeaders = ForwardedHeaders.All, +}); + app.UseHealthChecks("/healthz"); app.MapPrometheusScrapingEndpoint();