| @@ -290,6 +290,10 @@ matrix_nginx_proxy_floc_optout_enabled: true | |||||
| # - https://hstspreload.org/#opt-in | # - https://hstspreload.org/#opt-in | ||||
| matrix_nginx_proxy_hsts_preload_enable: false | matrix_nginx_proxy_hsts_preload_enable: false | ||||
| # | |||||
| # | |||||
| matrix_nginx_proxy_xss_protection: "1; mode=block" | |||||
| # Specifies the SSL configuration that should be used for the SSL protocols and ciphers | # Specifies the SSL configuration that should be used for the SSL protocols and ciphers | ||||
| # This is based on the Mozilla Server Side TLS Recommended configurations. | # This is based on the Mozilla Server Side TLS Recommended configurations. | ||||
| # | # | ||||
| @@ -9,6 +9,14 @@ | |||||
| {% if matrix_nginx_proxy_floc_optout_enabled %} | {% if matrix_nginx_proxy_floc_optout_enabled %} | ||||
| add_header Permissions-Policy interest-cohort=() always; | add_header Permissions-Policy interest-cohort=() always; | ||||
| {% endif %} | {% endif %} | ||||
| {% if matrix_nginx_proxy_hsts_preload_enable %} | |||||
| 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 }}"; | |||||
| {% for configuration_block in matrix_nginx_proxy_proxy_domain_additional_server_configuration_blocks %} | {% for configuration_block in matrix_nginx_proxy_proxy_domain_additional_server_configuration_blocks %} | ||||
| {{- configuration_block }} | {{- configuration_block }} | ||||
| @@ -8,7 +8,7 @@ | |||||
| {% else %} | {% else %} | ||||
| add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; | add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; | ||||
| {% endif %} | {% endif %} | ||||
| add_header X-XSS-Protection "1; mode=block";; | |||||
| add_header X-XSS-Protection "{{ matrix_nginx_proxy_xss_protection }}"; | |||||
| add_header X-Content-Type-Options nosniff; | add_header X-Content-Type-Options nosniff; | ||||
| {% for configuration_block in matrix_nginx_proxy_proxy_bot_go_neb_additional_server_configuration_blocks %} | {% for configuration_block in matrix_nginx_proxy_proxy_bot_go_neb_additional_server_configuration_blocks %} | ||||
| @@ -10,10 +10,8 @@ | |||||
| add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; | add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; | ||||
| {% endif %} | {% endif %} | ||||
| add_header X-Content-Type-Options nosniff; | add_header X-Content-Type-Options nosniff; | ||||
| add_header X-XSS-Protection "1; mode=block"; | |||||
| add_header X-XSS-Protection "{{ matrix_nginx_proxy_xss_protection }}"; | |||||
| add_header X-Frame-Options SAMEORIGIN; | add_header X-Frame-Options SAMEORIGIN; | ||||
| add_header Content-Security-Policy "frame-ancestors 'none'; require-trusted-types-for 'script'; base-uri 'self'"; | |||||
| add_header Referrer-Policy "strict-origin-when-cross-origin"; | |||||
| {% if matrix_nginx_proxy_floc_optout_enabled %} | {% if matrix_nginx_proxy_floc_optout_enabled %} | ||||
| add_header Permissions-Policy interest-cohort=() always; | add_header Permissions-Policy interest-cohort=() always; | ||||
| @@ -8,7 +8,7 @@ | |||||
| {% else %} | {% else %} | ||||
| add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; | add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; | ||||
| {% endif %} | {% endif %} | ||||
| add_header X-XSS-Protection "1; mode=block"; | |||||
| add_header X-XSS-Protection "{{ matrix_nginx_proxy_xss_protection }}"; | |||||
| add_header X-Content-Type-Options nosniff; | add_header X-Content-Type-Options nosniff; | ||||
| {% if matrix_nginx_proxy_floc_optout_enabled %} | {% if matrix_nginx_proxy_floc_optout_enabled %} | ||||
| add_header Permissions-Policy interest-cohort=() always; | add_header Permissions-Policy interest-cohort=() always; | ||||
| @@ -20,6 +20,14 @@ | |||||
| {% if matrix_nginx_proxy_floc_optout_enabled %} | {% if matrix_nginx_proxy_floc_optout_enabled %} | ||||
| add_header Permissions-Policy interest-cohort=() always; | add_header Permissions-Policy interest-cohort=() always; | ||||
| {% endif %} | {% endif %} | ||||
| {% if matrix_nginx_proxy_hsts_preload_enable %} | |||||
| 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 { | location /.well-known/matrix { | ||||
| root {{ matrix_static_files_base_path }}; | root {{ matrix_static_files_base_path }}; | ||||
| @@ -8,7 +8,7 @@ | |||||
| {% else %} | {% else %} | ||||
| add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; | add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; | ||||
| {% endif %} | {% endif %} | ||||
| add_header X-XSS-Protection "1; mode=block"; | |||||
| add_header X-XSS-Protection "{{ matrix_nginx_proxy_xss_protection }}"; | |||||
| add_header X-Content-Type-Options nosniff; | add_header X-Content-Type-Options nosniff; | ||||
| {% if matrix_nginx_proxy_floc_optout_enabled %} | {% if matrix_nginx_proxy_floc_optout_enabled %} | ||||
| add_header Permissions-Policy interest-cohort=() always; | add_header Permissions-Policy interest-cohort=() always; | ||||
| @@ -4,6 +4,14 @@ | |||||
| {% if matrix_nginx_proxy_floc_optout_enabled %} | {% if matrix_nginx_proxy_floc_optout_enabled %} | ||||
| add_header Permissions-Policy interest-cohort=() always; | add_header Permissions-Policy interest-cohort=() always; | ||||
| {% endif %} | {% endif %} | ||||
| {% if matrix_nginx_proxy_hsts_preload_enable %} | |||||
| 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 }}"; | |||||
| {% for configuration_block in matrix_nginx_proxy_proxy_riot_additional_server_configuration_blocks %} | {% for configuration_block in matrix_nginx_proxy_proxy_riot_additional_server_configuration_blocks %} | ||||
| {{- configuration_block }} | {{- configuration_block }} | ||||
| @@ -8,7 +8,7 @@ | |||||
| {% else %} | {% else %} | ||||
| add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; | add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; | ||||
| {% endif %} | {% endif %} | ||||
| add_header X-XSS-Protection "1; mode=block"; | |||||
| add_header X-XSS-Protection "{{ matrix_nginx_proxy_xss_protection }}"; | |||||
| add_header X-Content-Type-Options nosniff; | add_header X-Content-Type-Options nosniff; | ||||
| add_header X-Frame-Options DENY; | add_header X-Frame-Options DENY; | ||||