From 68287c3c660940fdb17db3d62dc47890cc333cc2 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Fri, 20 Jun 2025 10:23:37 +0200 Subject: [PATCH] Activated Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always for Nextcloud --- roles/docker-nextcloud/templates/nginx/docker.conf.j2 | 2 +- roles/nginx-serve-files/templates/nginx.conf.j2 | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/docker-nextcloud/templates/nginx/docker.conf.j2 b/roles/docker-nextcloud/templates/nginx/docker.conf.j2 index d4c66ca1..3c37043c 100644 --- a/roles/docker-nextcloud/templates/nginx/docker.conf.j2 +++ b/roles/docker-nextcloud/templates/nginx/docker.conf.j2 @@ -49,7 +49,7 @@ http { # will add the domain to a hardcoded list that is shipped # in all major browsers and getting removed from this list # could take several months. - #add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always; + add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always; # set max upload size client_max_body_size 512M; diff --git a/roles/nginx-serve-files/templates/nginx.conf.j2 b/roles/nginx-serve-files/templates/nginx.conf.j2 index eff7d2fe..4a8e9808 100644 --- a/roles/nginx-serve-files/templates/nginx.conf.j2 +++ b/roles/nginx-serve-files/templates/nginx.conf.j2 @@ -12,9 +12,9 @@ server location / { alias {{nginx.directories.data.files}}; {# Path to your file directory #} - autoindex on; {# Enable directory listing #} - autoindex_exact_size off; {# Display sizes in a human-readable format #} - autoindex_localtime on; {# Show local time #} + autoindex on; {# Enable directory listing #} + autoindex_exact_size off; {# Display sizes in a human-readable format #} + autoindex_localtime on; {# Show local time #} } location /.well-known/ {