server { listen 80; listen 8080; server_name island37.com www.island37.com; root /var/www/html; index index.html; # Security headers 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 X-XSS-Protection "1; mode=block" always; location /api/ { proxy_pass http://localhost:3031/api/; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; add_header Access-Control-Allow-Origin "https://island37.com" always; } location / { try_files $uri $uri/ /index.html; } }