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
1diff --git a/charm/launchpad-appserver/config.yaml b/charm/launchpad-appserver/config.yaml
2index 2ff6762..4f8cf12 100644
3--- a/charm/launchpad-appserver/config.yaml
4+++ b/charm/launchpad-appserver/config.yaml
5@@ -36,6 +36,7 @@ options:
6 - option httplog
7 - option httpchk HEAD /_status/ping
8 - option http-server-close
9+ - option forwardfor
10 - http-check disable-on-404
11 - balance roundrobin
12 haproxy_service_options_xmlrpc:
13@@ -46,6 +47,7 @@ options:
14 - option httplog
15 - option httpchk HEAD /_status/ping
16 - option http-server-close
17+ - option forwardfor
18 - http-check disable-on-404
19 - balance roundrobin
20 internal_macaroon_secret_key:
21diff --git a/charm/launchpad-librarian/config.yaml b/charm/launchpad-librarian/config.yaml
22index 937f30d..e5597a0 100644
23--- a/charm/launchpad-librarian/config.yaml
24+++ b/charm/launchpad-librarian/config.yaml
25@@ -14,6 +14,7 @@ options:
26 - mode http
27 - option httplog
28 - option httpchk HEAD / HTTP/1.0
29+ - option forwardfor
30 - balance leastconn
31 haproxy_service_options_upload:
32 type: string
33@@ -22,6 +23,7 @@ options:
34 - mode tcp
35 - option tcplog
36 - option httpchk HEAD / HTTP/1.0
37+ - option forwardfor
38 - balance leastconn
39 - timeout client 600000
40 - timeout server 600000

Subscribers

People subscribed via source and target branches

to status/vote changes: