mirror of
https://github.com/gramps-project/gramps-web.git
synced 2026-01-05 21:29:51 -06:00
32 lines
714 B
Plaintext
32 lines
714 B
Plaintext
|
|
client_max_body_size 500m;
|
|
|
|
server {
|
|
listen 80;
|
|
|
|
resolver ${NAME_SERVER} valid=30s ipv6=off;
|
|
resolver_timeout 5s;
|
|
|
|
root /usr/share/nginx/html;
|
|
|
|
location / {
|
|
try_files $uri $uri/ $uri.html /index.html;
|
|
}
|
|
|
|
location /api {
|
|
add_header "Access-Control-Allow-Origin" $http_origin;
|
|
proxy_redirect off;
|
|
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;
|
|
|
|
# WebSocket
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
|
|
proxy_pass ${API_HOST};
|
|
}
|
|
}
|