Merge ~cjwatson/launchpad:charm-haproxy-forwardfor into launchpad:master

Proposed by Colin Watson
Status: Merged
Approved by: Colin Watson
Approved revision: 0f9e82c73dd70fdbd78e4c1ad4c70514f8e88dd4
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~cjwatson/launchpad:charm-haproxy-forwardfor
Merge into: launchpad:master
Diff against target: 40 lines (+4/-0)
2 files modified
charm/launchpad-appserver/config.yaml (+2/-0)
charm/launchpad-librarian/config.yaml (+2/-0)
Reviewer Review Type Date Requested Status
Ines Almeida Approve
Review via email: mp+447650@code.launchpad.net

Commit message

charm: Ask haproxy to set X-Forwarded-For

Description of the change

Forwarding the original IP address makes some things much easier to debug, and it's also needed to make country-level statistics for librarian downloads work usefully.

To post a comment you must log in.
Revision history for this message
Ines Almeida (ines-almeida) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/charm/launchpad-appserver/config.yaml b/charm/launchpad-appserver/config.yaml
index 2ff6762..4f8cf12 100644
--- a/charm/launchpad-appserver/config.yaml
+++ b/charm/launchpad-appserver/config.yaml
@@ -36,6 +36,7 @@ options:
36 - option httplog36 - option httplog
37 - option httpchk HEAD /_status/ping37 - option httpchk HEAD /_status/ping
38 - option http-server-close38 - option http-server-close
39 - option forwardfor
39 - http-check disable-on-40440 - http-check disable-on-404
40 - balance roundrobin41 - balance roundrobin
41 haproxy_service_options_xmlrpc:42 haproxy_service_options_xmlrpc:
@@ -46,6 +47,7 @@ options:
46 - option httplog47 - option httplog
47 - option httpchk HEAD /_status/ping48 - option httpchk HEAD /_status/ping
48 - option http-server-close49 - option http-server-close
50 - option forwardfor
49 - http-check disable-on-40451 - http-check disable-on-404
50 - balance roundrobin52 - balance roundrobin
51 internal_macaroon_secret_key:53 internal_macaroon_secret_key:
diff --git a/charm/launchpad-librarian/config.yaml b/charm/launchpad-librarian/config.yaml
index 937f30d..e5597a0 100644
--- a/charm/launchpad-librarian/config.yaml
+++ b/charm/launchpad-librarian/config.yaml
@@ -14,6 +14,7 @@ options:
14 - mode http14 - mode http
15 - option httplog15 - option httplog
16 - option httpchk HEAD / HTTP/1.016 - option httpchk HEAD / HTTP/1.0
17 - option forwardfor
17 - balance leastconn18 - balance leastconn
18 haproxy_service_options_upload:19 haproxy_service_options_upload:
19 type: string20 type: string
@@ -22,6 +23,7 @@ options:
22 - mode tcp23 - mode tcp
23 - option tcplog24 - option tcplog
24 - option httpchk HEAD / HTTP/1.025 - option httpchk HEAD / HTTP/1.0
26 - option forwardfor
25 - balance leastconn27 - balance leastconn
26 - timeout client 60000028 - timeout client 600000
27 - timeout server 60000029 - timeout server 600000

Subscribers

People subscribed via source and target branches

to status/vote changes: