2026-04-16-3 add secur ,billing ,documents ,
This commit is contained in:
@@ -1,7 +1,15 @@
|
||||
# Rate limiting zones
|
||||
limit_req_zone $binary_remote_addr zone=tile_limit:10m rate=100r/s;
|
||||
limit_req_zone $binary_remote_addr zone=api_limit:10m rate=30r/s;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
|
||||
# Gzip compression for better performance
|
||||
gzip on;
|
||||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
@@ -10,17 +18,26 @@ server {
|
||||
|
||||
# Proxy API requests to the api service in docker
|
||||
location /api/ {
|
||||
limit_req zone=api_limit burst=20 nodelay;
|
||||
proxy_pass http://api:3200/api/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
proxy_set_header Host $host;
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
}
|
||||
|
||||
# Proxy Martin Vector Tiles (if accessed via dashboard directly)
|
||||
location /tiles/ {
|
||||
limit_req zone=tile_limit burst=50 nodelay;
|
||||
proxy_pass http://martin:3000/;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
# Cache tiles for performance
|
||||
add_header Cache-Control "public, max-age=3600";
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
|
||||
Reference in New Issue
Block a user