28 lines
763 B
Nginx Configuration File
28 lines
763 B
Nginx Configuration File
map $uri $caria_backend {
|
|
default telemetry:8080;
|
|
/api/weather weather:8080;
|
|
/api/map-config navigation:8080;
|
|
/api/search navigation:8080;
|
|
/api/route navigation:8080;
|
|
}
|
|
server {
|
|
listen 80;
|
|
server_name _;
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
add_header X-Content-Type-Options nosniff;
|
|
gzip on;
|
|
gzip_vary on;
|
|
gzip_comp_level 4;
|
|
gzip_min_length 1024;
|
|
gzip_types text/css text/javascript application/javascript application/json image/svg+xml;
|
|
location /api/ {
|
|
access_log off;
|
|
resolver 127.0.0.11 valid=10s ipv6=off;
|
|
proxy_pass http://$caria_backend;
|
|
proxy_connect_timeout 2s;
|
|
proxy_read_timeout 12s;
|
|
}
|
|
location / { try_files $uri $uri/ =404; }
|
|
}
|