From 4f09e96558f2dbc4dc76f65e215f0b6218dc000e Mon Sep 17 00:00:00 2001 From: Burkhard Ott-Langer Date: Tue, 1 Mar 2022 10:23:35 -0800 Subject: [PATCH] horizon_local_settings.py.j2: adding SECURE_PROXY_ADDR_HEADER - SECURE_PROXY_ADDR_HEADER is being used to return the clients remote address to the logs. On a failed login it is REMOTE_ADDR, which will be the loadbalancer address, SECURE_PROXY_ADDR_HEADER='HTTP_X_FORWARDED_FOR' makes sure the real client IP makes it into the logfiles. - https://docs.openstack.org/horizon/latest/configuration/settings.html#secure-proxy-addr-header Change-Id: I0d68cd4ba7882eb4296a2e4df59afa6582c0303a (cherry picked from commit d19c9c2cbb897eb911bd01369ea3855f33aab3b4) --- templates/horizon_local_settings.py.j2 | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/horizon_local_settings.py.j2 b/templates/horizon_local_settings.py.j2 index 0fa82fcb..287e430f 100644 --- a/templates/horizon_local_settings.py.j2 +++ b/templates/horizon_local_settings.py.j2 @@ -50,6 +50,7 @@ ALLOWED_HOSTS = [ "{{ horizon_allowed_hosts | join(',') }}" ] # For more information see: # https://docs.djangoproject.com/en/1.4/ref/settings/#secure-proxy-ssl-header SECURE_PROXY_SSL_HEADER = ('{{ horizon_secure_proxy_ssl_header_django }}', 'https') +SECURE_PROXY_ADDR_HEADER = 'HTTP_X_FORWARDED_FOR' {% endif %} {% if horizon_enable_ssl | bool %}