Spaces:
Sleeping
Sleeping
| server { | |
| listen 7860; | |
| server_name localhost; | |
| location / { | |
| root /usr/share/nginx/html; | |
| index index.html index.htm; | |
| try_files $uri $uri/ /index.html; | |
| } | |
| location /api/yahoo/ { | |
| proxy_pass https://query2.finance.yahoo.com/; | |
| proxy_set_header Host query2.finance.yahoo.com; | |
| 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; | |
| # Add CORS headers if needed (though since it's same-origin now it should be fine) | |
| add_header 'Access-Control-Allow-Origin' '*' always; | |
| } | |
| # Error handling | |
| error_page 500 502 503 504 /50x.html; | |
| location = /50x.html { | |
| root /usr/share/nginx/html; | |
| } | |
| } | |