Configure development rate limiter limit and fix base url in local tests runner
TaxBaik CI/CD / build-and-deploy (push) Successful in 1m36s

This commit is contained in:
2026-07-11 17:55:12 +09:00
parent dce8e23676
commit eccbd00902
2 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ def is_server_healthy(url):
def main():
port = 5001
base_url = f"http://localhost:{port}/taxbaik"
base_url = f"http://localhost:{port}"
health_url = f"{base_url}/healthz"
server_process = None
+4 -2
View File
@@ -69,11 +69,12 @@ builder.Services.AddRateLimiter(options =>
options.AddPolicy("client-logs", httpContext =>
{
var ip = httpContext.Connection.RemoteIpAddress?.ToString() ?? "unknown";
var isDevelopment = builder.Environment.IsDevelopment();
return RateLimitPartition.GetFixedWindowLimiter(
partitionKey: $"client-logs:{ip}",
factory: _ => new FixedWindowRateLimiterOptions
{
PermitLimit = 10,
PermitLimit = isDevelopment ? 200 : 10,
Window = TimeSpan.FromMinutes(1),
QueueLimit = 0,
AutoReplenishment = true
@@ -82,11 +83,12 @@ builder.Services.AddRateLimiter(options =>
options.AddPolicy("admin-login", httpContext =>
{
var ip = httpContext.Connection.RemoteIpAddress?.ToString() ?? "unknown";
var isDevelopment = builder.Environment.IsDevelopment();
return RateLimitPartition.GetFixedWindowLimiter(
partitionKey: $"admin-login:{ip}",
factory: _ => new FixedWindowRateLimiterOptions
{
PermitLimit = 5,
PermitLimit = isDevelopment ? 100 : 5,
Window = TimeSpan.FromMinutes(1),
QueueLimit = 0,
AutoReplenishment = true