28 lines
1,020 B
Text
28 lines
1,020 B
Text
location ~ ^(/_matrix|/_synapse/client|/_synapse/admin) {
|
|
# otherwise nginx will canonicalise the URI and cause signature verification
|
|
# errors.
|
|
proxy_pass http://localhost:8008;
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_set_header Host $host;
|
|
|
|
# Nginx by default only allows file uploads up to 1M in size
|
|
# Increase client_max_body_size to match max_upload_size defined in homeserver.yaml
|
|
|
|
# Synapse responses may be chunked, which is an HTTP/1.1 feature.
|
|
proxy_http_version 1.1;
|
|
}
|
|
|
|
|
|
location /.well-known/matrix/client {
|
|
alias /var/www/html/.well-known/matrix/client;
|
|
default_type application/json;
|
|
add_header Access-Control-Allow-Origin *;
|
|
}
|
|
|
|
|
|
location /.well-known/element/element.json {
|
|
root /var/www/html; # points to the folder containing '.well-known'
|
|
default_type application/json;
|
|
add_header Access-Control-Allow-Origin *;
|
|
}
|