|
|
|
@ -20,13 +20,13 @@
|
|
|
|
|
{% if matrix_nginx_proxy_floc_optout_enabled %}
|
|
|
|
|
add_header Permissions-Policy interest-cohort=() always;
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{% if matrix_nginx_proxy_hsts_preload_enabled %}
|
|
|
|
|
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
|
|
|
|
|
{% else %}
|
|
|
|
|
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
add_header X-XSS-Protection "{{ matrix_nginx_proxy_xss_protection }}";
|
|
|
|
|
|
|
|
|
|
location /.well-known/matrix {
|
|
|
|
@ -59,7 +59,7 @@
|
|
|
|
|
|
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
|
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
|
proxy_set_header X-Forwarded-Proto {{ matrix_nginx_proxy_x_forwarded_proto_value }};
|
|
|
|
|
}
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
@ -77,7 +77,7 @@
|
|
|
|
|
|
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
|
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
|
proxy_set_header X-Forwarded-Proto {{ matrix_nginx_proxy_x_forwarded_proto_value }};
|
|
|
|
|
}
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
@ -112,7 +112,7 @@
|
|
|
|
|
|
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
|
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
|
proxy_set_header X-Forwarded-Proto {{ matrix_nginx_proxy_x_forwarded_proto_value }};
|
|
|
|
|
}
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
@ -137,7 +137,7 @@
|
|
|
|
|
|
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
|
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
|
proxy_set_header X-Forwarded-Proto {{ matrix_nginx_proxy_x_forwarded_proto_value }};
|
|
|
|
|
|
|
|
|
|
client_body_buffer_size 25M;
|
|
|
|
|
client_max_body_size {{ matrix_nginx_proxy_proxy_matrix_client_api_client_max_body_size_mb }}M;
|
|
|
|
@ -152,7 +152,7 @@
|
|
|
|
|
#}
|
|
|
|
|
location ~* ^/$ {
|
|
|
|
|
{% if matrix_nginx_proxy_proxy_matrix_client_redirect_root_uri_to_domain %}
|
|
|
|
|
return 302 $scheme://{{ matrix_nginx_proxy_proxy_matrix_client_redirect_root_uri_to_domain }}$request_uri;
|
|
|
|
|
return 302 {{ matrix_nginx_proxy_x_forwarded_proto_value }}://{{ matrix_nginx_proxy_proxy_matrix_client_redirect_root_uri_to_domain }}$request_uri;
|
|
|
|
|
{% else %}
|
|
|
|
|
rewrite ^/$ /_matrix/static/ last;
|
|
|
|
|
{% endif %}
|
|
|
|
@ -215,12 +215,12 @@ server {
|
|
|
|
|
ssl_stapling_verify on;
|
|
|
|
|
ssl_trusted_certificate {{ matrix_ssl_config_dir_path }}/live/{{ matrix_nginx_proxy_proxy_matrix_hostname }}/chain.pem;
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{% if matrix_nginx_proxy_ssl_session_tickets_off %}
|
|
|
|
|
ssl_session_tickets off;
|
|
|
|
|
{% endif %}
|
|
|
|
|
ssl_session_cache {{ matrix_nginx_proxy_ssl_session_cache }};
|
|
|
|
|
ssl_session_timeout {{ matrix_nginx_proxy_ssl_session_timeout }};
|
|
|
|
|
ssl_session_timeout {{ matrix_nginx_proxy_ssl_session_timeout }};
|
|
|
|
|
|
|
|
|
|
{{ render_vhost_directives() }}
|
|
|
|
|
}
|
|
|
|
@ -262,7 +262,7 @@ server {
|
|
|
|
|
ssl_stapling_verify on;
|
|
|
|
|
ssl_trusted_certificate {{ matrix_nginx_proxy_proxy_matrix_federation_api_ssl_trusted_certificate }};
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{% if matrix_nginx_proxy_ssl_session_tickets_off %}
|
|
|
|
|
ssl_session_tickets off;
|
|
|
|
|
{% endif %}
|
|
|
|
@ -283,7 +283,7 @@ server {
|
|
|
|
|
|
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
|
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
|
proxy_set_header X-Forwarded-Proto {{ matrix_nginx_proxy_x_forwarded_proto_value }};
|
|
|
|
|
|
|
|
|
|
client_body_buffer_size 25M;
|
|
|
|
|
client_max_body_size {{ matrix_nginx_proxy_proxy_matrix_federation_api_client_max_body_size_mb }}M;
|
|
|
|
|