Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).

Each revision is versioned by the date of the revision.

## 2026-06-12

- Added `option forwardfor` by default for `haproxy-route` backends.

## 2026-06-05

- docs: Updated home page with additional information about HAProxy.
Expand Down
19 changes: 19 additions & 0 deletions docs/release-notes/artifacts/pr0550.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version_schema: 2

changes:
- title: Added option forwardfor by default to haproxy-route HTTP backends
author: Copilot
type: minor
description: >
Added `option forwardfor` to every HTTP backend in the
`haproxy_route.cfg.j2` template so HAProxy automatically set the
`X-Forwarded-For` header on proxied requests, allowing backend
applications to identify the original client IP. This restored
parity with the legacy configuration.
urls:
pr:
- https://github.com/canonical/haproxy-operator/pull/550
related_doc:
related_issue:
visibility: public
highlight: false
1 change: 1 addition & 0 deletions haproxy-operator/templates/haproxy_route.cfg.j2
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ peers haproxy_peers

{% for backend in http_backends %}
backend {{ backend.backend_name }}
option forwardfor
balance {{ backend.load_balancing_configuration }}
{% if backend.consistent_hashing %}
hash-type consistent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def test_protocol_https(
" ssl ca-file /var/lib/haproxy/cas/cas.pem alpn h2,http/1.1 check-alpn h2,http/1.1\n"
in haproxy_conf_contents
)
assert "option forwardfor" in haproxy_conf_contents
assert out.app_status == ActiveStatus("")


Expand Down
Loading