Make possible to use embed iframes

Because horizon local settings cannot use config_template, we
have to maintain the features possible in the template ourselves.

This adds the possibility to allow/deny the use of embedded
iframes.

Change-Id: I12470ac156a433eee795b4090b21d106418ecd5a
This commit is contained in:
Jean-Philippe Evrard 2017-01-09 09:00:55 +00:00
parent d70de6a8c4
commit 83efb05c6c
2 changed files with 10 additions and 0 deletions

View File

@ -0,0 +1,6 @@
---
features:
- It's now possible to change the behavior of
``DISALLOW_IFRAME_EMBED`` by defining the variable
``horizon_disallow_iframe_embed`` in the user
variables.

View File

@ -725,7 +725,11 @@ REST_API_REQUIRED_SETTINGS = ['OPENSTACK_HYPERVISOR_FEATURES',
# where iframes are not used in deployment. Default setting is True.
# For more information see:
# http://tinyurl.com/anticlickjack
{% if horizon_disallow_iframe_embed is defined %}
DISALLOW_IFRAME_EMBED = {{ horizon_disallow_iframe_embed }}
{% else %}
#DISALLOW_IFRAME_EMBED = True
{% endif %}
# The default date range in the Overview panel meters - either <today> minus N
# days (if the value is integer N), or from the beginning of the current month