server { listen 7860 default_server; root /var/www/html; index index.html; server_name _; location / { try_files $uri $uri/ =404; } chunked_transfer_encoding off; proxy_buffering off; proxy_cache off; location /v1 { if ($http_x_api_key = "API_TOKEN") { proxy_pass http://localhost:8444; } proxy_set_header Connection ''; proxy_http_version 1.1; } }