nginx fix

This commit is contained in:
2026-08-27 15:24:18 +05:30
parent a214ea67da
commit 2b8a599b68
3 changed files with 126 additions and 20 deletions

25
_to_delete/old-nginx.conf Normal file
View File

@@ -0,0 +1,25 @@
server {
listen 80;
server_name localhost;
# Serve the React App
location / {
root /usr/share/nginx/html;
index index.html index.htm;
# Force Nginx to pass routing back to React Router
try_files $uri $uri/ /index.html;
}
# Proxy /hasura to the live API, exactly like Vite dev server does
location /hasura/ {
proxy_pass https://api.workolik.com/api/rest/;
proxy_set_header x-hasura-admin-secret "nearle-admin-secret";
proxy_ssl_server_name on;
# Pass standard proxy headers
proxy_set_header Host api.workolik.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;
}
}