Enable proxy headers parsing

Automatically enable the proxy headers parsing middleware so Glance
can detect X-Forwarded-Proto when SSL is terminated at the load
balancer.

Change-Id: I4510749b1a4198834b9006a823f18edb48710460
This commit is contained in:
Logan V 2017-04-05 07:45:51 -05:00
parent f39ef212bf
commit bababac105
2 changed files with 9 additions and 0 deletions

View File

@ -122,6 +122,10 @@ glance_service_internalurl: "{{ glance_service_internaluri }}"
glance_service_adminuri: "{{ glance_service_adminuri_proto }}://{{ internal_lb_vip_address }}:{{ glance_service_port }}"
glance_service_adminurl: "{{ glance_service_adminuri }}"
## Enable automatic parsing of X-Forwarded-Proto, etc. headers passed by the
## load balancer.
glance_proxy_headers_parsing: True
## Swift Options
glance_swift_store_auth_address: "{{ keystone_service_internalurl }}"
glance_swift_store_auth_insecure: "{{ keystone_service_internaluri_insecure }}"

View File

@ -110,3 +110,8 @@ rbd_store_chunk_size = {{ glance_rbd_store_chunk_size }}
[profiler]
enabled = {{ glance_profiler_enabled }}
{% if glance_proxy_headers_parsing | bool %}
[oslo_middleware]
enable_proxy_headers_parsing = True
{% endif %}