Kaynağa Gözat

Fix nginx warning: adding already-default text/html to gzip_types

pull/6/head
Slavi Pantaleev 7 yıl önce
ebeveyn
işleme
b0f1a1c80f
5 değiştirilmiş dosya ile 53 ekleme ve 3 silme
  1. +3
    -1
      roles/matrix-server/tasks/setup_synapse_ext.yml
  2. +43
    -0
      roles/matrix-server/tasks/setup_synapse_ext_shared_secret_auth.yml
  3. +1
    -1
      roles/matrix-server/templates/nginx-conf.d/matrix-riot-web.conf.j2
  4. +1
    -1
      roles/matrix-server/templates/nginx-conf.d/matrix-synapse.conf.j2
  5. +5
    -0
      roles/matrix-server/templates/synapse/homeserver.yaml.j2

+ 3
- 1
roles/matrix-server/tasks/setup_synapse_ext.yml Dosyayı Görüntüle

@@ -1,3 +1,5 @@
--- ---


- include: tasks/setup_synapse_ext_rest_auth.yml
- include: tasks/setup_synapse_ext_rest_auth.yml

- include: tasks/setup_synapse_ext_shared_secret_auth.yml

+ 43
- 0
roles/matrix-server/tasks/setup_synapse_ext_shared_secret_auth.yml Dosyayı Görüntüle

@@ -0,0 +1,43 @@
---

#
# Tasks related to setting up matrix-synapse-shared-secret-auth
#

- name: Download matrix-synapse-shared-secret-auth
get_url:
url: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_download_url }}"
dest: "{{ matrix_synapse_ext_path }}/shared_secret_authenticator.py"
force: true
mode: 0440
owner: "{{ matrix_user_username }}"
group: "{{ matrix_user_username }}"
when: "matrix_synapse_ext_password_provider_shared_secret_auth_enabled"

- set_fact:
matrix_synapse_password_providers_enabled: true
when: "matrix_synapse_ext_password_provider_shared_secret_auth_enabled"

- set_fact:
matrix_synapse_container_additional_volumes: >
{{ matrix_synapse_container_additional_volumes }}
+
{{ [{'src': '{{ matrix_synapse_ext_path }}/shared_secret_authenticator.py', 'dst': '/usr/local/lib/python2.7/site-packages/shared_secret_authenticator.py', 'options': 'ro'}] }}
when: "matrix_synapse_ext_password_provider_shared_secret_auth_enabled"

- set_fact:
matrix_synapse_additional_loggers: >
{{ matrix_synapse_additional_loggers }}
+
{{ [{'name': 'shared_secret_authenticator', 'level': 'INFO'}] }}
when: "matrix_synapse_ext_password_provider_shared_secret_auth_enabled"

#
# Tasks related to getting rid of matrix-synapse-shared-secret-auth (if it was previously enabled)
#

- name: Ensure matrix-synapse-shared-secret-auth doesn't exist
file:
path: "{{ matrix_synapse_ext_path }}/shared_secret_authenticator.py"
state: absent
when: "not matrix_synapse_ext_password_provider_shared_secret_auth_enabled"

+ 1
- 1
roles/matrix-server/templates/nginx-conf.d/matrix-riot-web.conf.j2 Dosyayı Görüntüle

@@ -34,7 +34,7 @@ server {
root /dev/null; root /dev/null;


gzip on; gzip on;
gzip_types text/plain text/html application/json application/javascript text/css image/x-icon font/ttf image/gif;
gzip_types text/plain application/json application/javascript text/css image/x-icon font/ttf image/gif;


ssl_certificate {{ matrix_ssl_certs_path }}/live/{{ hostname_riot }}/fullchain; ssl_certificate {{ matrix_ssl_certs_path }}/live/{{ hostname_riot }}/fullchain;
ssl_certificate_key {{ matrix_ssl_certs_path }}/live/{{ hostname_riot }}/privkey; ssl_certificate_key {{ matrix_ssl_certs_path }}/live/{{ hostname_riot }}/privkey;


+ 1
- 1
roles/matrix-server/templates/nginx-conf.d/matrix-synapse.conf.j2 Dosyayı Görüntüle

@@ -34,7 +34,7 @@ server {
root /dev/null; root /dev/null;


gzip on; gzip on;
gzip_types text/plain text/html application/json;
gzip_types text/plain application/json;


ssl_certificate {{ matrix_ssl_certs_path }}/live/{{ hostname_matrix }}/fullchain; ssl_certificate {{ matrix_ssl_certs_path }}/live/{{ hostname_matrix }}/fullchain;
ssl_certificate_key {{ matrix_ssl_certs_path }}/live/{{ hostname_matrix }}/privkey; ssl_certificate_key {{ matrix_ssl_certs_path }}/live/{{ hostname_matrix }}/privkey;


+ 5
- 0
roles/matrix-server/templates/synapse/homeserver.yaml.j2 Dosyayı Görüntüle

@@ -596,6 +596,11 @@ password_providers:
profile: profile:
name: {{ matrix_synapse_ext_password_provider_rest_auth_login_profile_name_autofill }} name: {{ matrix_synapse_ext_password_provider_rest_auth_login_profile_name_autofill }}
{% endif %} {% endif %}
{% if matrix_synapse_ext_password_provider_shared_secret_auth_enabled %}
- module: "shared_secret_authenticator.SharedSecretAuthenticator"
config:
sharedSecret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret }}"
{% endif %}
{% endif %} {% endif %}






Yükleniyor…
İptal
Kaydet