diff --git a/MediaFeeder/MediaFeeder/Program.cs b/MediaFeeder/MediaFeeder/Program.cs index 25bc844..a872f4d 100644 --- a/MediaFeeder/MediaFeeder/Program.cs +++ b/MediaFeeder/MediaFeeder/Program.cs @@ -1,3 +1,4 @@ +using System.Net; using MediaFeeder; using MediaFeeder.Components; using MediaFeeder.Components.Account; @@ -15,11 +16,10 @@ using OpenTelemetry.Trace; using MediaFeeder.Services; using Microsoft.AspNetCore.HttpOverrides; +using IPNetwork = Microsoft.AspNetCore.HttpOverrides.IPNetwork; var builder = WebApplication.CreateBuilder(args); -IdentityModelEventSource.ShowPII = true; - // Add services to the container. builder.Services.AddRazorComponents() .AddInteractiveServerComponents() @@ -120,13 +120,8 @@ builder.Services.AddAntDesign(); builder.Services.AddControllers(); -IdentityModelEventSource.ShowPII = true; - - var app = builder.Build(); -IdentityModelEventSource.ShowPII = true; - // Configure the HTTP request pipeline. if (app.Environment.IsDevelopment()) { @@ -145,6 +140,7 @@ app.UseForwardedHeaders(new ForwardedHeadersOptions { ForwardedHeaders = ForwardedHeaders.All, + KnownNetworks = { new IPNetwork(new IPAddress(0), 0) } }); app.UseHealthChecks("/healthz"); @@ -168,6 +164,4 @@ app.MapGrpcService(); app.MapGrpcHealthChecksService(); -IdentityModelEventSource.ShowPII = true; - app.Run();