38 lines
1.2 KiB
Nginx Configuration File
Executable File
38 lines
1.2 KiB
Nginx Configuration File
Executable File
# IP당 로그인 요청 제한 (분당 5회)
|
|
limit_req_zone $binary_remote_addr zone=login_limit:10m rate=5r/m;
|
|
|
|
server {
|
|
listen 80;
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
location / {
|
|
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;
|
|
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 /health {
|
|
proxy_pass http://backend-service.web-portal.svc.cluster.local:8000/health;
|
|
}
|
|
} |