From 75b2991137190d7924ad98d7e9a5a77c50027837 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 31 Aug 2017 11:23:16 -0400 Subject: [PATCH] inline out --- src/Api/Middleware/CustomIpRateLimitMiddleware.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Api/Middleware/CustomIpRateLimitMiddleware.cs b/src/Api/Middleware/CustomIpRateLimitMiddleware.cs index ab6d5e21a..244e3f3b5 100644 --- a/src/Api/Middleware/CustomIpRateLimitMiddleware.cs +++ b/src/Api/Middleware/CustomIpRateLimitMiddleware.cs @@ -52,8 +52,7 @@ namespace Bit.Api.Middleware base.LogBlockedRequest(httpContext, identity, counter, rule); var key = $"blockedIp_{identity.ClientIp}"; - int blockedCount; - _memoryCache.TryGetValue(key, out blockedCount); + _memoryCache.TryGetValue(key, out int blockedCount); blockedCount++; if(blockedCount > 10)