We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 183b374 commit 7661369Copy full SHA for 7661369
ReplayBrowser/Startup.cs
@@ -93,7 +93,15 @@ public void ConfigureServices(IServiceCollection services)
93
services.Configure<ForwardedHeadersOptions>(options =>
94
{
95
options.ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto;
96
- options.KnownProxies.Add(IPAddress.Parse(Configuration["ProxyIP"]));
+ var proxyIP = Configuration["ProxyIP"];
97
+ if (proxyIP == null)
98
+ {
99
+ Log.Fatal("No proxy IP found in appsettings.json. Exiting.");
100
+ Environment.Exit(1);
101
+ }
102
+
103
+ Log.Information("Proxy IP: {ProxyIP}", proxyIP);
104
+ options.KnownProxies.Add(IPAddress.Parse(proxyIP));
105
});
106
107
services.AddOpenTelemetry().WithMetrics(providerBuilder =>
0 commit comments