This commit is contained in:
2026-05-20 18:16:21 +05:30
parent a0b7803148
commit 57ef8fb55c
3 changed files with 69 additions and 0 deletions

37
nginx.sample.conf Normal file
View File

@@ -0,0 +1,37 @@
# If you are hosting this on your own Nginx server, you must add these
# location blocks to your configuration to proxy the API requests,
# otherwise Nginx will just return the React index.html for API calls!
server {
# ... your existing config ...
# Proxy REST API requests to jupiter
location /live/ {
proxy_pass https://jupiter.nearle.app/live/;
proxy_set_header Host jupiter.nearle.app;
proxy_ssl_server_name on;
# Optional: forward client IP
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_addrs;
proxy_set_header X-Forwarded-Proto $scheme;
}
# Proxy GraphQL API requests to legacy backend
location /api/ {
proxy_pass https://api.workolik.com/api/;
proxy_set_header Host api.workolik.com;
proxy_ssl_server_name on;
# Optional: forward client IP
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_addrs;
proxy_set_header X-Forwarded-Proto $scheme;
}
# Serve the React application
location / {
root /path/to/your/dist;
try_files $uri $uri/ /index.html;
}
}