ソースを参照

Set Dendrite's real_ip_header correctly

pull/1520/head
Slavi Pantaleev 4年前
コミット
5c3c0d0d58
3個のファイルの変更7行の追加0行の削除
  1. +2
    -0
      group_vars/matrix_servers
  2. +4
    -0
      roles/matrix-dendrite/defaults/main.yml
  3. +1
    -0
      roles/matrix-dendrite/templates/dendrite/dendrite.yaml.j2

+ 2
- 0
group_vars/matrix_servers ファイルの表示

@@ -2231,6 +2231,8 @@ matrix_dendrite_container_http_host_bind_address: "{{ '' if matrix_nginx_proxy_e
# For exposing Dendrite's HTTPS server to the local host. # For exposing Dendrite's HTTPS server to the local host.
matrix_dendrite_container_https_host_bind_address: "{{ '' if matrix_nginx_proxy_enabled or not matrix_dendrite_https_bind_port else ('127.0.0.1:' + matrix_dendrite_https_bind_port|string) }}" matrix_dendrite_container_https_host_bind_address: "{{ '' if matrix_nginx_proxy_enabled or not matrix_dendrite_https_bind_port else ('127.0.0.1:' + matrix_dendrite_https_bind_port|string) }}"


matrix_dendrite_sync_api_real_ip_header: "{{ 'X-Forwarded-For' if matrix_nginx_proxy_enabled else '' }}"

matrix_dendrite_registration_shared_secret: "{{ matrix_homeserver_generic_secret_key | password_hash('sha512', 'dendrite.rss') | to_uuid }}" matrix_dendrite_registration_shared_secret: "{{ matrix_homeserver_generic_secret_key | password_hash('sha512', 'dendrite.rss') | to_uuid }}"


matrix_dendrite_database_password: "{{ matrix_homeserver_generic_secret_key | password_hash('sha512', 'dendrite.db') | to_uuid }}" matrix_dendrite_database_password: "{{ matrix_homeserver_generic_secret_key | password_hash('sha512', 'dendrite.db') | to_uuid }}"


+ 4
- 0
roles/matrix-dendrite/defaults/main.yml ファイルの表示

@@ -68,6 +68,10 @@ matrix_dendrite_allow_guest_access: false


matrix_dendrite_max_file_size_bytes: 10485760 matrix_dendrite_max_file_size_bytes: 10485760


# Controls which HTTP header (e.g. 'X-Forwarded-For', 'X-Real-IP') to inspect to find the real remote IP address of the client.
# This is likely required if Dendrite is running behind a reverse proxy server.
matrix_dendrite_sync_api_real_ip_header: ''

# The tmpfs at /tmp needs to be large enough to handle multiple concurrent file uploads. # The tmpfs at /tmp needs to be large enough to handle multiple concurrent file uploads.
matrix_dendrite_tmp_directory_size_mb: 500 matrix_dendrite_tmp_directory_size_mb: 500




+ 1
- 0
roles/matrix-dendrite/templates/dendrite/dendrite.yaml.j2 ファイルの表示

@@ -339,6 +339,7 @@ sync_api:
# address of the client. This is likely required if Dendrite is running behind # address of the client. This is likely required if Dendrite is running behind
# a reverse proxy server. # a reverse proxy server.
# real_ip_header: X-Real-IP # real_ip_header: X-Real-IP
real_ip_header: {{ matrix_dendrite_sync_api_real_ip_header|to_json }}


# Configuration for the User API. # Configuration for the User API.
user_api: user_api:


読み込み中…
キャンセル
保存