瀏覽代碼

Add support for configuring allow_embedding for Grafana

Fixes https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1626
pull/1630/head
Slavi Pantaleev 4 年之前
父節點
當前提交
f0ab2ec506
共有 2 個檔案被更改,包括 6 行新增0 行删除
  1. +4
    -0
      roles/matrix-grafana/defaults/main.yml
  2. +2
    -0
      roles/matrix-grafana/templates/grafana.ini.j2

+ 4
- 0
roles/matrix-grafana/defaults/main.yml 查看文件

@@ -22,6 +22,10 @@ matrix_grafana_data_path: "{{ matrix_grafana_base_path }}/data"
# Allow viewing Grafana without logging in # Allow viewing Grafana without logging in
matrix_grafana_anonymous_access: false matrix_grafana_anonymous_access: false


# Allow `false`, sends a `X-Frame-Options: deny` HTTP header, which allows Grafana from being embeded in a frame.
# Read more here: https://grafana.com/docs/grafana/latest/administration/configuration/#allow_embedding
matrix_grafana_allow_embedding: false

# specify organization name that should be used for unauthenticated users # specify organization name that should be used for unauthenticated users
# if you change this in the Grafana admin panel, this needs to be updated # if you change this in the Grafana admin panel, this needs to be updated
# to match to keep anonymous logins working # to match to keep anonymous logins working


+ 2
- 0
roles/matrix-grafana/templates/grafana.ini.j2 查看文件

@@ -16,6 +16,8 @@ content_security_policy = "{{ matrix_grafana_content_security_policy }}"
content_security_policy_template = """{{ matrix_grafana_content_security_policy_template }}""" content_security_policy_template = """{{ matrix_grafana_content_security_policy_template }}"""
{% endif %} {% endif %}


allow_embedding = {{ matrix_grafana_allow_embedding }}

[auth.anonymous] [auth.anonymous]
# enable anonymous access # enable anonymous access
enabled = {{ matrix_grafana_anonymous_access }} enabled = {{ matrix_grafana_anonymous_access }}


Loading…
取消
儲存