Add support for configuring max_upload_size

This commit is contained in:
Slavi Pantaleev 2017-08-30 12:07:03 +03:00
parent b046052aed
commit 2bb8bb96d4
3 changed files with 10 additions and 4 deletions

View File

@ -45,3 +45,5 @@ matrix_coturn_turn_udp_min_port: 49152
matrix_coturn_turn_udp_max_port: 49172 matrix_coturn_turn_udp_max_port: 49172
matrix_coturn_turn_external_ip_address: "{{ ansible_host }}" matrix_coturn_turn_external_ip_address: "{{ ansible_host }}"
matrix_max_upload_size_mb: 10

View File

@ -101,6 +101,12 @@
- {'variable': 'max-port', 'value': "{{ matrix_coturn_turn_udp_max_port }}"} - {'variable': 'max-port', 'value': "{{ matrix_coturn_turn_udp_max_port }}"}
- {'variable': 'external-ip', 'value': "{{ matrix_coturn_turn_external_ip_address }}"} - {'variable': 'external-ip', 'value': "{{ matrix_coturn_turn_external_ip_address }}"}
- name: Augment Matrix config (set max upload size)
lineinfile: "dest={{ matrix_synapse_data_path }}/homeserver.yaml"
args:
regexp: "^max_upload_size:"
line: 'max_upload_size: "{{ matrix_max_upload_size_mb }}M"'
- name: Allow access to Matrix ports in firewalld - name: Allow access to Matrix ports in firewalld
firewalld: firewalld:
port: "{{ item }}" port: "{{ item }}"

View File

@ -34,10 +34,8 @@ server {
proxy_pass http://synapse:8008; proxy_pass http://synapse:8008;
proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-For $remote_addr;
# These are intentionally large.
# Note that Synapse enforces its own limits, which are smaller.
client_body_buffer_size 25M; client_body_buffer_size 25M;
client_max_body_size 100M; client_max_body_size {{ matrix_max_upload_size_mb }}M;
proxy_max_temp_file_size 0; proxy_max_temp_file_size 0;
} }
} }