mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 10:59:59 +00:00
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>
46 lines
2.0 KiB
Django/Jinja
46 lines
2.0 KiB
Django/Jinja
{% set location = location | default("/")%}
|
|
location {{location}}
|
|
{
|
|
{% if sso_proxy_enabled | default(false) | bool %}
|
|
{% include 'roles/web-app-keycloak/templates/sso_proxy/following_directives.conf.j2'%}
|
|
{% else %}
|
|
{% include 'roles/sys-svc-proxy/templates/headers/identity_request_strips.conf.j2'%}
|
|
{% endif %}
|
|
|
|
{% include 'roles/sys-svc-proxy/templates/headers/content_security_policy.conf.j2' %}
|
|
|
|
{% include 'roles/sys-svc-proxy/templates/headers/access_control_allow.conf.j2' %}
|
|
|
|
{% if webserver_location_extra_configuration is defined %}
|
|
{{ webserver_location_extra_configuration }}
|
|
{% endif %}
|
|
|
|
client_max_body_size {{ webserver_client_max_body_size | default(lookup('config', application_id, 'server.client_max_body_size', '100m')) }};
|
|
|
|
{{ lookup('proxy_pass', application_id, proxy_service_key | default(application_id | get_entity_name), 'http', tail='request', location=location, local_port=http_port, internal_port=proxy_internal_port | default('')) }}
|
|
|
|
proxy_set_header Authorization $http_authorization;
|
|
{% include 'roles/sys-svc-proxy/templates/headers/forwarded.conf.j2' %}
|
|
proxy_pass_request_headers on;
|
|
|
|
{% include 'roles/sys-svc-proxy/templates/headers/upstream_strips.conf.j2' %}
|
|
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $proxy_upgrade;
|
|
proxy_set_header Connection $connection_upgrade;
|
|
|
|
proxy_connect_timeout 5s;
|
|
proxy_send_timeout {{ webserver_proxy_send_timeout | default('900s') }};
|
|
proxy_read_timeout {{ webserver_proxy_read_timeout | default('900s') }};
|
|
send_timeout {{ webserver_send_timeout | default('900s') }};
|
|
|
|
{% set proxy_lua_enabled = proxy_lua_enabled | default(true) | bool %}
|
|
proxy_buffering {{ 'on' if proxy_lua_enabled else 'off' }};
|
|
proxy_request_buffering {{ 'on' if proxy_lua_enabled else 'off' }};
|
|
|
|
{% if proxy_lua_enabled %}
|
|
proxy_set_header Accept-Encoding "";
|
|
{% include 'roles/sys-front-inj-all/templates/location.lua.j2'%}
|
|
{% endif %}
|
|
}
|