Updated to C# 12
This commit is contained in:
@@ -12,12 +12,12 @@ namespace Microsoft.AspNetCore.Http
|
||||
public static class HttpContextExtensions
|
||||
{
|
||||
// Search these additional headers for a remote client ip address.
|
||||
private static readonly string[] _defaultIpHeaderNames = new[]
|
||||
{
|
||||
private static readonly string[] _defaultIpHeaderNames =
|
||||
[
|
||||
"Cf-Connecting-Ip", // set by Cloudflare
|
||||
"X-Real-IP", // wide-spread alternative to X-Forwarded-For
|
||||
"X-Forwarded-For", // commonly used on all known proxies
|
||||
};
|
||||
];
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the antiforgery token.
|
||||
|
||||
Reference in New Issue
Block a user