octavia/api-ref/source
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 Adds v2 general API information section 2017-03-03 14:35:57 -08:00
v1 Switch to using PKCS12 for TLS Term certs 2018-01-23 07:17:14 +00:00
v2 Adding support for the octavia listener X-Forwarded-Proto header insertion. 2018-06-19 09:55:36 +02:00
conf.py Update docs config for storyboard bugs 2018-02-01 17:24:24 -08:00
http-status.yaml Adds v2 load balancer API section 2017-04-04 20:27:57 -07:00
index.rst Update Octavia docs for documentation migration 2017-07-03 11:43:40 -07:00
parameters.yaml Implement provider drivers - Cleanup 2018-06-04 19:34:42 -07:00