octavia/api-ref/source/v2
Rafal Pietrzak d3f0a50014 Adding support for the octavia listener X-Forwarded-Proto header insertion.
Adding support for the octavia listener X-Forwarded-Proto header insertion.
  A X-Forwarded-Proto header is inserted into the end of request to the backend
  member. HTTP for the HTTP listener protocol type, HTTPS for
  the TERMINATED_HTTPS listener protocol type.

  Adding X-Forwarded-Proto to the list of HTTP headers which are supported.

  File: octavia/master/octavia/octavia/common/constants.py:
      SUPPORTED_HTTP_HEADERS = ['X-Forwarded-For',
                                'X-Forwarded-Port',
                                'X-Forwarded-Proto']

  Adding the lines to the macros.j2 realizing the the http/https insertion
  to the backend member according to listener protocol type:

  File:  octavia/common/jinja/haproxy/templates/macros.j2

    {% if listener.insert_headers.get('X-Forwarded-Proto',
                                          'False').lower() == 'true' %}
        {% if listener.protocol.lower() == constants.PROTOCOL_HTTP.lower() %}
    http-request set-header X-Forwarded-Proto http
        {% elif listener.protocol.lower() ==
                               constants.PROTOCOL_TERMINATED_HTTPS.lower() %}
    http-request set-header X-Forwarded-Proto https
        {% endif %}
    {% endif %}

Change-Id: Id017bb277eebae98f0441663e41d07b40b6e3e38
Story: 2002173
Task: 20038
2018-06-19 09:55:36 +02:00
..
examples Implement provider drivers - Cleanup 2018-06-04 19:34:42 -07:00
amphora.inc Add image_id to amphora table 2018-02-27 14:46:25 +00:00
general.inc [Trivialfix]Fix typos in octavia 2017-08-31 20:34:41 +00:00
healthmonitor.inc Add v2 L7 Policy API section 2017-06-26 13:33:26 -07:00
index.rst Implement provider drivers - Cleanup 2018-06-04 19:34:42 -07:00
l7policy.inc Repalce Chinese quotes to English quotes 2018-02-05 18:39:02 +08:00
l7rule.inc Repalce Chinese quotes to English quotes 2018-02-05 18:39:02 +08:00
listener.inc Adding support for the octavia listener X-Forwarded-Proto header insertion. 2018-06-19 09:55:36 +02:00
loadbalancer.inc Correct flavor to flavor_id in LB API 2018-04-20 23:55:04 +00:00
member.inc Allow members to be set as "backup" 2018-04-04 07:47:31 +09:00
pool.inc Add v2 L7 Policy API section 2017-06-26 13:33:26 -07:00
provider.inc Implement provider drivers - Cleanup 2018-06-04 19:34:42 -07:00
quota.inc Rename 'remove' to 'reset' in Quota API 2017-11-27 16:52:06 +02:00