41 lines
895 B
Nginx Configuration File
41 lines
895 B
Nginx Configuration File
server {
|
|
|
|
listen 80;
|
|
server_name _;
|
|
sendfile on;
|
|
|
|
default_type application/octet-stream;
|
|
|
|
gzip on;
|
|
gzip_http_version 1.1;
|
|
gzip_disable "MSIE [1-6]\.";
|
|
gzip_min_length 256;
|
|
gzip_vary on;
|
|
gzip_proxied expired no-cache no-store private auth;
|
|
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;
|
|
gzip_comp_level 9;
|
|
|
|
location / {
|
|
root /www/data;
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
location /healthy {
|
|
return 204;
|
|
}
|
|
|
|
location = /api/v1 {
|
|
absolute_redirect off;
|
|
return 302 /api/v1/;
|
|
}
|
|
|
|
location /api/v1/ {
|
|
proxy_pass ${API_URL}/;
|
|
proxy_buffering off;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-Host $host;
|
|
proxy_set_header X-Forwarded-Port $server_port;
|
|
}
|
|
|
|
}
|