1
0
Fork 0

Add support for proxy-awareness headers: X-Forwarded-For, X-Forwarded-Port, X-Forwarded-Proto, X-Forwarded-Host, and X-Request-ID

- Updated HAProxy configuration template to set all standard proxy headers for HTTP requests.
- Added support for a unique request ID via `unique-id-format` and `unique-id-header` directives.
- Implemented E2E tests for header validation, request correlation, and configuration correctness.
- Enhanced documentation to explain usage and examples of proxy headers.
- Updated CI workflows to include E2E tests for proxy headers.
This commit is contained in:
Joao Gilberto Magalhaes 2026-02-16 17:26:59 -05:00
parent 4aba68dd37
commit 776f216a36
19 changed files with 480 additions and 4 deletions

View file

@ -134,6 +134,8 @@ backend srv_phpapp_local_80
option forwardfor
http-request set-header X-Forwarded-Port %[dst_port]
http-request add-header X-Forwarded-Proto https if { ssl_fc }
http-request set-header X-Forwarded-Host %[req.hdr(Host)]
http-request set-header X-Request-ID %[uuid()]
server srv-0 /run/php/php-fpm.sock check weight 1 proto fcgi
```