Files
MiragenFlow/nginx.conf
T

47 lines
1.2 KiB
Nginx Configuration File

server {
listen 3000;
server_name _;
root /usr/share/nginx/html;
index index.html;
location = /admin {
return 301 /admin/;
}
# The API/WS gateway is kept behind the same public origin. In local
# compose it resolves to the `server` service; production can point this
# upstream at the colocated gateway process.
location /api/ {
proxy_pass http://server:3100;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Request-Id $request_id;
proxy_set_header Connection "";
proxy_request_buffering on;
client_max_body_size 10m;
}
location /api/v1/ws/ {
proxy_pass http://server:3100;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Request-Id $request_id;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 1h;
proxy_send_timeout 1h;
proxy_buffering off;
}
location /admin/ {
try_files $uri $uri/ /admin/index.html;
}
location / {
try_files $uri $uri/ /index.html;
}
}