Преглед изворни кода

Add matrix_synapse_url_preview_url_blacklist var (#4641)

* synapse - introduce matrix_synapse_url_preview_url_blacklist var

* Preserve original comments around `url_preview_url_blacklist`

---------

Co-authored-by: Aleksandrs Jansons <alex@peledu.casa>
Co-authored-by: Slavi Pantaleev <slavi@devture.com>
pull/4642/head
Aleksandrs Jansons пре 4 месеци
committed by GitHub
родитељ
комит
8511d4dfc4
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
2 измењених фајлова са 8 додато и 0 уклоњено
  1. +5
    -0
      roles/custom/matrix-synapse/defaults/main.yml
  2. +3
    -0
      roles/custom/matrix-synapse/templates/synapse/homeserver.yaml.j2

+ 5
- 0
roles/custom/matrix-synapse/defaults/main.yml Прегледај датотеку

@@ -823,6 +823,11 @@ matrix_synapse_url_preview_ip_range_blacklist:
# List of IP address CIDR ranges that the URL preview spider is allowed to access even if they are specified in `matrix_synapse_url_preview_ip_range_blacklist`. # List of IP address CIDR ranges that the URL preview spider is allowed to access even if they are specified in `matrix_synapse_url_preview_ip_range_blacklist`.
matrix_synapse_url_preview_ip_range_whitelist: [] matrix_synapse_url_preview_ip_range_whitelist: []


# List of URL matches that the URL preview spider is denied from accessing.
# See https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html#url_preview_url_blacklist
# for more details.
matrix_synapse_url_preview_url_blacklist: []

# A list of values for the Accept-Language HTTP header used when downloading webpages during URL preview generation # A list of values for the Accept-Language HTTP header used when downloading webpages during URL preview generation
matrix_url_preview_accept_language: ['en-US', 'en'] matrix_url_preview_accept_language: ['en-US', 'en']




+ 3
- 0
roles/custom/matrix-synapse/templates/synapse/homeserver.yaml.j2 Прегледај датотеку

@@ -1178,6 +1178,9 @@ url_preview_ip_range_whitelist: {{ matrix_synapse_url_preview_ip_range_whitelist
# #
# # blacklist any URL with a literal IPv4 address # # blacklist any URL with a literal IPv4 address
# - netloc: '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$' # - netloc: '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$'
{% if matrix_synapse_url_preview_url_blacklist | length > 0 %}
url_preview_url_blacklist: {{ matrix_synapse_url_preview_url_blacklist | to_json }}
{% endif %}


# The largest allowed URL preview spidering size in bytes # The largest allowed URL preview spidering size in bytes
# #


Loading…
Откажи
Сачувај