# ── Admin portal ──────────────────────────────────────────────── # NOTE: HTTP only — upgrade to HTTPS with: sudo certbot --nginx -d admin.mydomain.com server { listen 80; server_name admin.mydomain.com; # IP allowlist — office / VPN only # allow 203.0.113.0/24; # deny all; # add_header X-Frame-Options "DENY" always; # add_header X-Content-Type-Options "nosniff" always; # add_header Referrer-Policy "strict-origin-when-cross-origin" always; location / { proxy_pass http://unix:/run/salonpos/salon_pos_admin.sock; 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; client_max_body_size 5m; } location /static/admin/ { alias /home/salonpos/app/static/admin/; expires 7d; } } # ── Tenant portal ──────────────────────────────────────────────── # NOTE: HTTP only — upgrade to HTTPS with: sudo certbot --nginx -d mydomain.com server { listen 80; server_name mydomain.com; # add_header X-Frame-Options "SAMEORIGIN" always; # add_header X-Content-Type-Options "nosniff" always; # add_header Referrer-Policy "strict-origin-when-cross-origin" always; # add_header Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; frame-ancestors 'none';" always; location / { proxy_pass http://unix:/run/salonpos/salon_pos_tenant.sock; 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; client_max_body_size 5m; } location /static/tenant/ { alias /home/salonpos/app/static/tenant/; expires 7d; } }