ASP.NET Core 10.0
Last reviewed Oct 11, 2026
Prompt Details
Prompt Composition
2prompts
- C# 14106 lines · 4.4K tokens
- ASP.NET Core 10.065 lines · 3.5K tokens
Total171 lines · 7.9K tokens
CWE Coverage
- 20
- 22
- 59
- 73
- 78
- 79
- 89
- 94
- 117
- 190
- 208
- 209
- 214
- 257
- 295
- 307
- 312
- 319
- 323
- 327
- 338
- 352
- 362
- 367
- 378
- 426
- 434
- 488
- 502
- 524
- 525
- 532
- 552
- 601
- 611
- 613
- 614
- 636
- 639
- 674
- 759
- 770
- 772
- 775
- 778
- 798
- 807
- 862
- 915
- 916
- 918
- 942
- 1004
- 1275
- 1333
- 1385
- 1395
Prompt Preview
Apply the C# 14 baseline first. When ASP.NET Core Identity manages accounts, also apply the ASP.NET Core Identity 10.0 prompt for password hashing, lockout, security stamps, and recovery tokens.
Hosting and proxy boundaries
- Configure
ForwardedHeadersOptions.ForwardedHeadersexplicitly; it defaults toNonewithForwardLimit1and only loopback trusted, so list everyKnownProxiesentry orKnownIPNetworksrange and never accept forwarding headers from arbitrary peers.KnownNetworksandMicrosoft.AspNetCore.HttpOverrides.IPNetworkare obsolete in .NET 10 (ASPDEPR005). - Don't set
ASPNETCORE_FORWARDEDHEADERS_ENABLED=true(keyForwardedHeaders_Enabled) unless network policy guarantees only the trusted proxy reaches the app: the default host then enablesXForwardedFor | XForwardedProto, insertsUseForwardedHeaders(), and clearsKnownProxiesandKnownIPNetworks, trusting any peer. PreferConfigure<ForwardedHeadersOptions>with the proxy addresses; if the flag is required, re-add them there, since that callback runs after the flag's setup. - Never set
ForwardLimit = nullunlessKnownProxiesorKnownIPNetworksstill bounds the chain, and discard client-suppliedX-Forwarded-*values at the trusted edge. - Set Host Filtering's
AllowedHostsfor direct hosts andForwardedHeadersOptions.AllowedHostsfor forwarded ones, and derive absolute URLs only after trusted proxy processing; never use an unvalidatedHost,X-Forwarded-Host, or request scheme in redirects, reset links, cookie scope, or security decisions. UseLocalRedirectfor