Skip to content

Commit

Permalink
nginx conf
Browse files Browse the repository at this point in the history
  • Loading branch information
v00g100skr committed Jan 9, 2025
1 parent 0d127bb commit 65c3b68
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions deploy/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ http {
set_real_ip_from 172.64.0.0/13;
set_real_ip_from 131.0.72.0/22;

limit_req_zone $binary_remote_addr zone=ip_limit:10m rate=3r/s;

# Log format to include the real IP address
log_format custom '[$time_local] '
'$remote_addr:$server_port $remote_user '
Expand All @@ -62,21 +60,12 @@ http {
}

location / {
limit_req zone=ip_limit burst=6 nodelay;
proxy_pass http://map_web_server:8080; # Replace with the IP or container name
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_set_header X-Forwarded-Proto $scheme;
}

error_page 429 = /rate-limit-error.html;

location = /rate-limit-error.html {
internal;
default_type text/html;
return 429 "<h1>Too Many Requests</h1><p>Please slow down.</p>";
}
}
# Jaam API server
server {
Expand Down

0 comments on commit 65c3b68

Please sign in to comment.