From 610eef82b59abaed38f25a4fb30f0fd8e67c6a53 Mon Sep 17 00:00:00 2001 From: Edgars Voroboks Date: Tue, 12 Mar 2019 12:17:12 +0200 Subject: [PATCH] Add option to enable Dimension widgets serve sites with self signed certs --- roles/matrix-dimension/defaults/main.yml | 3 +++ .../templates/systemd/matrix-dimension.service.j2 | 3 +++ 2 files changed, 6 insertions(+) diff --git a/roles/matrix-dimension/defaults/main.yml b/roles/matrix-dimension/defaults/main.yml index 31d899f2..ee1b18a0 100644 --- a/roles/matrix-dimension/defaults/main.yml +++ b/roles/matrix-dimension/defaults/main.yml @@ -7,6 +7,9 @@ matrix_dimension_access_token: "" # Users in form: ['@user1:domain.com', '@user2:domain.com'] matrix_dimension_admins: [] +# Whether to allow Dimension widgets serve websites with invalid or self signed SSL certificates +matrix_dimension_widgets_allow_self_signed_ssl_certificates: false + matrix_dimension_base_path: "{{ matrix_base_data_path }}/dimension" matrix_dimension_docker_image: "turt2live/matrix-dimension:latest" diff --git a/roles/matrix-dimension/templates/systemd/matrix-dimension.service.j2 b/roles/matrix-dimension/templates/systemd/matrix-dimension.service.j2 index 554713d8..12f111f3 100644 --- a/roles/matrix-dimension/templates/systemd/matrix-dimension.service.j2 +++ b/roles/matrix-dimension/templates/systemd/matrix-dimension.service.j2 @@ -12,6 +12,9 @@ ExecStart=/usr/bin/docker run --rm --name matrix-dimension \ --user={{ matrix_dimension_user_uid }}:{{ matrix_dimension_user_gid }} \ --cap-drop=ALL \ --network={{ matrix_docker_network }} \ + {% if matrix_dimension_widgets_allow_self_signed_ssl_certificates %} + -e NODE_TLS_REJECT_UNAUTHORIZED=0 \ + {% endif %} {% if matrix_dimension_container_expose_port %} -p 127.0.0.1:8184:8184 \ {% endif %}