瀏覽代碼

Make Synapse's url_preview_accept_language default to 'en-US, en'

Related to https://github.com/matrix-org/synapse/issues/11604

Getting an upstream fix is preferable. In any case, it's probably nice
to have this defined explicitly in our configuration. This way, people
can more easily discover that they can override the URL preview
language.
pull/1475/head
Slavi Pantaleev 4 年之前
父節點
當前提交
01b6bba9d7
共有 2 個檔案被更改,包括 4 行新增2 行删除
  1. +3
    -0
      roles/matrix-synapse/defaults/main.yml
  2. +1
    -2
      roles/matrix-synapse/templates/synapse/homeserver.yaml.j2

+ 3
- 0
roles/matrix-synapse/defaults/main.yml 查看文件

@@ -321,6 +321,9 @@ matrix_synapse_push_include_content: true
# URLs shared by users.
matrix_synapse_url_preview_enabled: true

# 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']

# Enable exposure of metrics to Prometheus
# See https://github.com/matrix-org/synapse/blob/master/docs/metrics-howto.md
matrix_synapse_metrics_enabled: false


+ 1
- 2
roles/matrix-synapse/templates/synapse/homeserver.yaml.j2 查看文件

@@ -1149,8 +1149,7 @@ max_spider_size: 10M
# - fr;q=0.8
# - *;q=0.7
#
url_preview_accept_language:
# - en
url_preview_accept_language: {{ matrix_url_preview_accept_language|to_json }}


## Captcha ##


Loading…
取消
儲存