diff --git a/ordinis-admin-ui/nginx.conf b/ordinis-admin-ui/nginx.conf index 69875a0..bab5399 100644 --- a/ordinis-admin-ui/nginx.conf +++ b/ordinis-admin-ui/nginx.conf @@ -2,18 +2,19 @@ server { listen 80; server_name _; + # Resolver для динамического k8s service DNS (proxy_pass с переменной). + # 169.254.25.10 — nodelocal-dns на kubespray-кластерах (cluster.265 и .264). + resolver 169.254.25.10 1.1.1.1 valid=30s ipv6=off; + # Real client IP behind ingress-nginx. set_real_ip_from 0.0.0.0/0; real_ip_header X-Forwarded-For; real_ip_recursive on; - # SPA history fallback. root /usr/share/nginx/html; index index.html; - # GET /api/v1/dictionaries и /api/v1//records → read-api. - # POST/PUT/PATCH/DELETE на тех же путях → writer (ordinis-app). - # Method-based routing через map. + # GET → read-api, мутирующие → writer. location /api/v1/ { set $backend "ordinis-read-api"; if ($request_method ~ ^(POST|PUT|PATCH|DELETE)$) { @@ -28,6 +29,7 @@ server { proxy_pass_request_headers on; } + # SPA history fallback. location / { try_files $uri $uri/ /index.html; }