28 lines
711 B
Nginx Configuration File
28 lines
711 B
Nginx Configuration File
server {
|
|
listen 8080;
|
|
server_name _;
|
|
|
|
access_log /dev/stdout;
|
|
error_log /dev/stderr;
|
|
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
# query service has no CORS headers and no authentication: the API must be
|
|
# served same-origin with the UI.
|
|
location /api/v1/ {
|
|
proxy_pass http://127.0.0.1:9557;
|
|
proxy_http_version 1.1;
|
|
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_read_timeout 300s;
|
|
proxy_send_timeout 300s;
|
|
}
|
|
|
|
# SPA fallback: routing is client-side.
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
}
|