server { listen 80; root /usr/share/nginx/html; index index.html; # Proxy API calls to the backend container location /api/ { proxy_pass http://backend:8080/api/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; } # Yahoo Finance proxy (replaces the Vite dev proxy) location /yahoo/ { proxy_pass https://query1.finance.yahoo.com/; proxy_ssl_server_name on; proxy_set_header Host query1.finance.yahoo.com; } location /yahoo2/ { proxy_pass https://query2.finance.yahoo.com/; proxy_ssl_server_name on; proxy_set_header Host query2.finance.yahoo.com; } # SPA fallback location / { try_files $uri $uri/ /index.html; } }