Trust loopback forwarded headers and pin the Data Protection key ring
UseForwardedHeaders runs first with KnownProxies exactly loopback and ForwardLimit 1; Data Protection always uses application name "Bifrost"; the startup validator refuses production without DataProtection:KeysPath. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
837bc11a15
commit
2e0de9601c
4 changed files with 207 additions and 4 deletions
|
|
@ -66,6 +66,11 @@ public sealed class StartupConfigurationValidator(
|
|||
failures.Add("Connection string 'Bifrost' must be configured.");
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(configuration["DataProtection:KeysPath"]))
|
||||
{
|
||||
failures.Add("DataProtection:KeysPath must be configured for production.");
|
||||
}
|
||||
|
||||
if (failures.Count > 0)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
|
|
|
|||
Loading…
Reference in a new issue