From e65d7e64ecd9f95968b88b106d07ab7f412d3e86 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Tue, 27 Sep 2022 00:02:58 +0200 Subject: [PATCH] Use X-Real-IP for proxy header --- conf/dendrite.yaml | 2 +- conf/nginx.conf | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/conf/dendrite.yaml b/conf/dendrite.yaml index e5ce76e..e334ec7 100644 --- a/conf/dendrite.yaml +++ b/conf/dendrite.yaml @@ -326,7 +326,7 @@ sync_api: # This option controls which HTTP header 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. - # real_ip_header: X-Real-IP + real_ip_header: X-Real-IP # Configuration for the User API. user_api: diff --git a/conf/nginx.conf b/conf/nginx.conf index 8f13985..c037f05 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -6,9 +6,7 @@ location ~ ^/$ { location /_matrix { proxy_pass http://localhost:__PORT__; - more_set_headers "X-Forwarded-For: $remote_addr"; more_set_headers "X-Real-IP: $remote_addr"; - more_set_headers "Host: $host"; proxy_read_timeout 600; client_max_body_size 100M; more_set_headers "Access-Control-Allow-Origin: *";