Fix nginx warning: adding already-default text/html to gzip_types
This commit is contained in:
parent
832a4d71c1
commit
b0f1a1c80f
@ -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
|
@ -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"
|
@ -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;
|
||||||
|
@ -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;
|
||||||
|
@ -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 %}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user