Injection entête X-Forwarded-Prefix

This commit is contained in:
wpetit 2022-08-16 15:30:26 +02:00
parent 93d8997f6f
commit 636a3a10d7

View File

@ -85,6 +85,8 @@ backend hydra_dispatcher
balance roundrobin
# Suppression du préfixe /auth/dispatcher dans l'URL
http-request set-path %[path,regsub(^{{ haproxy_hydra_dispatcher_base_path }}/,/)]
http-request set-header X-Forwarded-Prefix {{ haproxy_hydra_dispatcher_base_path }}
server hydra-login-dispatcher 127.0.0.1:3000 check
{% if enable_hydra_passwordless %}
@ -93,6 +95,8 @@ backend hydra_passwordless
balance roundrobin
# Suppression du préfixe /auth/passwordless dans l'URL
http-request set-path %[path,regsub(^{{ haproxy_hydra_passwordless_base_path }},)]
http-request set-header X-Forwarded-Prefix {{ haproxy_hydra_passwordless_base_path }}
server hydra-login-passwordless 127.0.0.1:3001 check
{%- endif %}
@ -102,6 +106,8 @@ backend hydra_oidc
balance roundrobin
# Suppression du préfixe /auth/oidc dans l'URL
http-request set-path %[path,regsub(^{{ haproxy_hydra_oidc_base_path }},)]
http-request set-header X-Forwarded-Prefix {{ haproxy_hydra_oidc_base_path }}
server hydra-login-oidc 127.0.0.1:3004 check
{%- endif %}
@ -117,5 +123,7 @@ backend oidc_test
balance roundrobin
# Suppression du préfixe /auth/test dans l'URL
http-request set-path %[path,regsub(^{{ haproxy_oidc_test_base_path }},/)]
http-request set-header X-Forwarded-Prefix {{ haproxy_oidc_test_base_path }}
server oidc-test 127.0.0.1:8080 check
{% endif %}