diff --git a/roles/matrix_synapse/defaults/main.yml b/roles/matrix_synapse/defaults/main.yml index e1b963b..d84f576 100644 --- a/roles/matrix_synapse/defaults/main.yml +++ b/roles/matrix_synapse/defaults/main.yml @@ -1,7 +1,7 @@ --- # Synapse version to deploy -synapse_version: 1.27.0 +synapse_version: 1.28.0 # Synapse install dir synapse_root_dir: /opt/matrix/synapse @@ -78,6 +78,13 @@ synapse_url_preview_ip_range_blacklist: - '100.64.0.0/10' - '169.254.0.0/16' synapse_url_preview_ip_range_whitelist: [] +synapse_url_preview_url_blacklist: [] +# synapse_url_preview_url_blacklist: +# - username: '*' +# - netloc: '*.example.org' +# path: /admin +# - scheme: http +# - netloc: '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$' synapse_max_spider_size: 10M # Turn configuration, for VoIP/Video using WebRTC diff --git a/roles/matrix_synapse/templates/homeserver.yaml.j2 b/roles/matrix_synapse/templates/homeserver.yaml.j2 index fdba606..10ebd4a 100644 --- a/roles/matrix_synapse/templates/homeserver.yaml.j2 +++ b/roles/matrix_synapse/templates/homeserver.yaml.j2 @@ -129,6 +129,10 @@ url_preview_ip_range_whitelist: - '{{ ip }}' {% endfor %} {% endif %} +{% if synapse_url_preview_url_blacklist is defined and synapse_url_preview_url_blacklist | length > 0 %} +url_preview_url_blacklist: +{{ synapse_url_preview_url_blacklist | to_nice_yaml(indent=2, width=1000) }} +{% endif %} max_spider_size: {{ synapse_max_spider_size }} {% endif %}