This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
# IP당 로그인 요청 제한 (분당 5회)
|
||||
limit_req_zone $binary_remote_addr zone=login_limit:10m rate=5r/m;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
root /usr/share/nginx/html;
|
||||
@@ -7,6 +10,19 @@ server {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
# 로그인 API - rate limiting 적용
|
||||
location /api/auth/login {
|
||||
limit_req zone=login_limit burst=3 nodelay;
|
||||
limit_req_status 429;
|
||||
|
||||
proxy_pass http://backend-service.web-portal.svc.cluster.local:8000/api/auth/login;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_read_timeout 60s;
|
||||
proxy_connect_timeout 10s;
|
||||
}
|
||||
|
||||
location /api/ {
|
||||
proxy_pass http://backend-service.web-portal.svc.cluster.local:8000/api/;
|
||||
proxy_set_header Host $host;
|
||||
@@ -19,4 +35,4 @@ server {
|
||||
location /health {
|
||||
proxy_pass http://backend-service.web-portal.svc.cluster.local:8000/health;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user