Spaces:
Sleeping
Sleeping
File size: 828 Bytes
c2b7eb3 95b1ab8 c2b7eb3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | 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;
}
}
|