Add ability to configure ALLOWED_HOSTS for horizon.
This patch add the ability to configure the ALLOWED_HOSTS in horizon_local_settings.py. Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-repo_server/+/766257 Change-Id: I9712dc1e9a41757cf71d3d0704e9885493ce1583
This commit is contained in:
parent
4a0910086a
commit
8e3570e002
@ -148,6 +148,10 @@ horizon_session_timeout: 1800
|
|||||||
## Horizon Help URL Path
|
## Horizon Help URL Path
|
||||||
horizon_help_url: https://docs.openstack.org/horizon/latest/user/
|
horizon_help_url: https://docs.openstack.org/horizon/latest/user/
|
||||||
|
|
||||||
|
## Horizon ALLOWED_HOSTS
|
||||||
|
horizon_allowed_hosts:
|
||||||
|
- '*'
|
||||||
|
|
||||||
## Installation directories
|
## Installation directories
|
||||||
horizon_lib_dir: "{{ _horizon_lib_dir }}"
|
horizon_lib_dir: "{{ _horizon_lib_dir }}"
|
||||||
horizon_lib_wsgi_file: "{{ horizon_lib_dir }}/openstack_dashboard/wsgi.py"
|
horizon_lib_wsgi_file: "{{ horizon_lib_dir }}/openstack_dashboard/wsgi.py"
|
||||||
|
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- Add ``horizon_allowed_hosts`` to be able to configure django ALLOWED_HOSTS.
|
||||||
|
The default is still the same as it was but you can create a list of allowed
|
||||||
|
hosts in ``/etc/openstack_deploy/user_variables.yml``. to set the correct
|
||||||
|
value, see https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
|
||||||
|
for more details.
|
@ -41,7 +41,7 @@ LOGOUT_URL = '{{ horizon_logout_url }}'
|
|||||||
# with the list of host/domain names that the application can serve.
|
# with the list of host/domain names that the application can serve.
|
||||||
# For more information see:
|
# For more information see:
|
||||||
# https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
|
# https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
|
||||||
ALLOWED_HOSTS = ['*']
|
ALLOWED_HOSTS = [ "{{ horizon_allowed_hosts | join(',') }}" ]
|
||||||
|
|
||||||
{% if (horizon_enable_ssl | bool) and (horizon_external_ssl | bool) %}
|
{% if (horizon_enable_ssl | bool) and (horizon_external_ssl | bool) %}
|
||||||
# Set SSL proxy settings:
|
# Set SSL proxy settings:
|
||||||
|
Loading…
Reference in New Issue
Block a user