mirror of
https://github.com/bitwarden/server.git
synced 2025-07-01 08:02:49 -05:00
Changing CF-Connecting-IP -> X-Connecting-IP. Also renaming CloudFlareConnectingIp. (#3236)
This commit is contained in:
@ -21,7 +21,7 @@ public class InfoController : Controller
|
||||
[HttpGet("~/ip")]
|
||||
public JsonResult Ip()
|
||||
{
|
||||
var headerSet = new HashSet<string> { "x-forwarded-for", "cf-connecting-ip", "client-ip" };
|
||||
var headerSet = new HashSet<string> { "x-forwarded-for", "x-connecting-ip", "cf-connecting-ip", "client-ip", "true-client-ip" };
|
||||
var headers = HttpContext.Request?.Headers
|
||||
.Where(h => headerSet.Contains(h.Key.ToLower()))
|
||||
.ToDictionary(h => h.Key);
|
||||
|
@ -79,7 +79,7 @@
|
||||
"IpRateLimitOptions": {
|
||||
"EnableEndpointRateLimiting": true,
|
||||
"StackBlockedRequests": false,
|
||||
"RealIpHeader": "CF-Connecting-IP",
|
||||
"RealIpHeader": "X-Connecting-IP",
|
||||
"ClientIdHeader": "X-ClientId",
|
||||
"HttpStatusCode": 429,
|
||||
"IpWhitelist": [],
|
||||
|
Reference in New Issue
Block a user