25 lines
849 B
Nginx Configuration File
25 lines
849 B
Nginx Configuration File
# Serves bettersight.io's static page and reverse-proxies /api/* to the
|
|
# SAME shared `backend` service bi.bettersight.io uses (see
|
|
# ../docker-compose.yml) — one Flask app, one Resend account, for both
|
|
# sites' contact forms. The browser only ever sees this one origin, so no
|
|
# CORS setup is needed and the backend's Python source is never reachable
|
|
# as a static file. Identical structure to ../nginx.conf.
|
|
server {
|
|
listen 80;
|
|
server_name _;
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
location /api/ {
|
|
proxy_pass http://backend:5000/api/;
|
|
proxy_set_header Host $host;
|
|
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;
|
|
}
|
|
|
|
location / {
|
|
try_files $uri $uri/ =404;
|
|
}
|
|
}
|