1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/dendrite_ynh.git synced 2024-09-03 18:25:58 +02:00

Use X-Real-IP for proxy header

This commit is contained in:
tituspijean 2022-09-27 00:02:58 +02:00
parent 6e51553c5d
commit e65d7e64ec
No known key found for this signature in database
GPG key ID: EF3B0D7CC0A94720
2 changed files with 1 additions and 3 deletions

View file

@ -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:

View file

@ -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: *";