# Pingora real-path canary handoff server. # 中文注释:本文件只提供人工 include 后的本机真实路径 canary,不默认承接公网流量。 # 启用前复制到目标机并替换 __GENARRATIVE_PINGORA_PROBE_TOKEN__,只能在 nginx http 上下文 include。 server { listen 127.0.0.1:18083; server_name genarrative-pingora-realpath-canary.local; access_log /var/log/nginx/genarrative-pingora-realpath-canary.access.log genarrative_upstream; error_log /var/log/nginx/genarrative-pingora-realpath-canary.error.log warn; allow 127.0.0.1; allow ::1; deny all; location = /__genarrative_pingora_realpath_canary/healthz { proxy_http_version 1.1; proxy_set_header Connection ""; 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_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Request-Id $request_id; proxy_set_header X-Genarrative-Pingora-Probe "__GENARRATIVE_PINGORA_PROBE_TOKEN__"; add_header X-Genarrative-Nginx-Handoff pingora-realpath-canary always; proxy_pass http://127.0.0.1:18081/__genarrative_pingora/healthz; } location = /api/assets/history { default_type application/json; proxy_http_version 1.1; proxy_buffering off; proxy_read_timeout 3600s; proxy_send_timeout 3600s; proxy_set_header Connection ""; 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_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Request-Id $request_id; proxy_set_header X-Genarrative-Pingora-Canary "nginx-realpath"; add_header X-Accel-Buffering no always; add_header X-Genarrative-Nginx-Handoff pingora-realpath-canary always; proxy_pass http://127.0.0.1:18081; } location ~ ^/v1/database/[^/]+/subscribe$ { proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header Host $host; proxy_set_header X-Request-Id $request_id; proxy_read_timeout 3600s; add_header X-Genarrative-Nginx-Handoff pingora-realpath-canary always; proxy_pass http://127.0.0.1:18081; } location ^~ /v1/identity { proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header Host $host; proxy_set_header X-Request-Id $request_id; add_header X-Genarrative-Nginx-Handoff pingora-realpath-canary always; proxy_pass http://127.0.0.1:18081; } location = /assets/app.js { proxy_http_version 1.1; proxy_set_header Connection ""; proxy_set_header Host $host; proxy_set_header X-Request-Id $request_id; add_header X-Genarrative-Nginx-Handoff pingora-realpath-canary always; proxy_pass http://127.0.0.1:18081; } location = /generated-pingora-canary-smoke { proxy_http_version 1.1; proxy_set_header Connection ""; proxy_set_header Host $host; proxy_set_header X-Request-Id $request_id; add_header X-Genarrative-Nginx-Handoff pingora-realpath-canary always; proxy_pass http://127.0.0.1:18081; } location / { return 404; } }