updateweb

This commit is contained in:
Local Server
2025-12-14 01:54:40 -06:00
parent dce6460994
commit 61929a5daf
454 changed files with 12193 additions and 42002 deletions

View File

@@ -106,31 +106,9 @@ server {
client_max_body_size 1M;
}
# Admin login with strict rate limiting
location = /admin/login {
limit_req zone=login burst=2 nodelay;
limit_req zone=admin burst=5 nodelay;
proxy_pass http://skyartshop_backend;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection keep-alive;
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_connect_timeout 60s;
proxy_send_timeout 60s;
proxy_read_timeout 60s;
client_max_body_size 1M;
}
# Admin area with stricter rate limiting (handles all other /admin/* paths)
location /admin/ {
limit_req zone=admin burst=10 nodelay;
# API routes - proxy to backend
location /api/ {
limit_req zone=general burst=100 nodelay;
proxy_pass http://skyartshop_backend;
proxy_http_version 1.1;
@@ -149,6 +127,27 @@ server {
client_max_body_size 50M;
}
# Admin static files (HTML, CSS, JS)
location /admin/ {
limit_req zone=admin burst=20 nodelay;
alias /var/www/skyartshop/admin/;
try_files $uri $uri/ =404;
# Cache static assets
location ~* \.(css|js|jpg|jpeg|png|gif|ico|svg|woff|woff2|ttf|eot)$ {
expires 7d;
add_header Cache-Control "public, immutable";
}
# No cache for HTML files
location ~* \.html$ {
add_header Cache-Control "no-cache, no-store, must-revalidate";
add_header Pragma "no-cache";
add_header Expires "0";
}
}
# Main application - catch all
location / {
proxy_pass http://skyartshop_backend;