From 85703845a426d873e294b8e751f7181beaea3aa0 Mon Sep 17 00:00:00 2001 From: BlackBean99 <54030889+BlackBean99@users.noreply.github.com> Date: Fri, 30 Jun 2023 19:01:20 +0900 Subject: [PATCH] =?UTF-8?q?hotfix=20:=20health=EC=B2=B4=ED=81=AC=20?= =?UTF-8?q?=EB=AC=B4=EC=8B=9C=20(#122)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/depromeet/whatnow/config/rateLimit/IPRateLimiter.kt | 4 ++-- .../whatnow/config/rateLimit/ThrottlingInterceptor.kt | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Whatnow-Api/src/main/kotlin/com/depromeet/whatnow/config/rateLimit/IPRateLimiter.kt b/Whatnow-Api/src/main/kotlin/com/depromeet/whatnow/config/rateLimit/IPRateLimiter.kt index aea7f1a0..ee778990 100644 --- a/Whatnow-Api/src/main/kotlin/com/depromeet/whatnow/config/rateLimit/IPRateLimiter.kt +++ b/Whatnow-Api/src/main/kotlin/com/depromeet/whatnow/config/rateLimit/IPRateLimiter.kt @@ -16,10 +16,10 @@ class IPRateLimiter( val buckets: ProxyManager? = null, @Value("\${throttle.overdraft}") - val overdraft: Long = 0, + val overdraft: Long, @Value("\${throttle.greedyRefill}") - private val greedyRefill: Long = 0, + private val greedyRefill: Long, ) { fun resolveBucket(key: String?): Bucket { val configSupplier: Supplier = configSupplierForUser diff --git a/Whatnow-Api/src/main/kotlin/com/depromeet/whatnow/config/rateLimit/ThrottlingInterceptor.kt b/Whatnow-Api/src/main/kotlin/com/depromeet/whatnow/config/rateLimit/ThrottlingInterceptor.kt index b426c4c3..df3f92bf 100644 --- a/Whatnow-Api/src/main/kotlin/com/depromeet/whatnow/config/rateLimit/ThrottlingInterceptor.kt +++ b/Whatnow-Api/src/main/kotlin/com/depromeet/whatnow/config/rateLimit/ThrottlingInterceptor.kt @@ -37,6 +37,10 @@ class ThrottlingInterceptor( response: HttpServletResponse, handler: Any, ): Boolean { + // 헬스체크 무시 + if (request.requestURI.contains("/v1/example/health")) { + return true + } val userId: Long = SecurityUtils.currentUserId val remoteAddr = request.remoteAddr log.info("remoteAddr : $remoteAddr")