← Back to team overview

launchpad-reviewers team mailing list archive

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

 

Colin Watson has proposed merging ~cjwatson/launchpad:charm-haproxy-forwardfor into launchpad:master.

Commit message:
charm: Ask haproxy to set X-Forwarded-For

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/447650

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.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:charm-haproxy-forwardfor into launchpad:master.
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:
       - option httplog
       - option httpchk HEAD /_status/ping
       - option http-server-close
+      - option forwardfor
       - http-check disable-on-404
       - balance roundrobin
   haproxy_service_options_xmlrpc:
@@ -46,6 +47,7 @@ options:
       - option httplog
       - option httpchk HEAD /_status/ping
       - option http-server-close
+      - option forwardfor
       - http-check disable-on-404
       - balance roundrobin
   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:
       - mode http
       - option httplog
       - option httpchk HEAD / HTTP/1.0
+      - option forwardfor
       - balance leastconn
   haproxy_service_options_upload:
     type: string
@@ -22,6 +23,7 @@ options:
       - mode tcp
       - option tcplog
       - option httpchk HEAD / HTTP/1.0
+      - option forwardfor
       - balance leastconn
       - timeout client 600000
       - timeout server 600000