Files
computer-playbook/roles/sys-svc-proxy/templates/location/ws.conf.j2
kevinveenbirkenbachandClaude Opus 5.5 eda3bdbc35 refactor(sys-svc-proxy): set the upstream request headers in one snippet
Host, X-Real-IP, X-Forwarded-For, X-Forwarded-Proto, X-Forwarded-Port and
X-Forwarded-Ssl were written out separately in the html, ws and upload
locations and in the Prometheus health probes, and the copies had drifted:
ws and upload never sent Port and Ssl, and the probes sent only Host, which
is how the Shopware readiness probe came to see plain http.

headers/forwarded.conf.j2 now holds the set and every one of those locations
includes it. The html location renders the same headers as before. ws and
upload additionally send Port and Ssl with the values the html location
already gives the same backend. The ready and live probes gain X-Real-IP and
X-Forwarded-For, and the live probe the three X-Forwarded headers as well.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-09 17:15:22 +02:00

14 lines
702 B
Django/Jinja

location {{ webserver_websocket_location }} {
{% include 'roles/sys-svc-proxy/templates/headers/identity_request_strips.conf.j2' %}
{% include 'roles/sys-svc-proxy/templates/headers/forwarded.conf.j2' %}
{{ lookup('proxy_pass', application_id, proxy_service_key | default(application_id | get_entity_name), 'http', tail='plain', local_port=websocket_port, internal_port=proxy_internal_port | default('')) }}
{% include 'roles/sys-svc-proxy/templates/headers/upstream_strips.conf.j2' %}
proxy_buffering off;
proxy_http_version 1.1;
proxy_set_header Upgrade $proxy_upgrade;
proxy_set_header Connection $connection_upgrade;
tcp_nodelay on;
}