mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
nixos/nextcloud: add Strict-Transport-Security
This commit adds a Strict-Transport-Security header to the nginx config file generated by the nextcloud module. The Strict-Transport-Security header is recommended in official guide for hardening Nextcloud installations: https://docs.nextcloud.com/server/16/admin_manual/installation/harden_server.html Further, if it is not set, we see a warning in the security scan results in the Nextcloud admin panel: ``` The "Strict-Transport-Security" HTTP header is not set to at least "15552000" seconds. For enhanced security, it is recommended to enable HSTS as described in the security tips ```
This commit is contained in:
parent
99b12cfc08
commit
4590a2380e
1 changed files with 1 additions and 0 deletions
|
@ -531,6 +531,7 @@ in {
|
|||
add_header X-Download-Options noopen;
|
||||
add_header X-Permitted-Cross-Domain-Policies none;
|
||||
add_header Referrer-Policy no-referrer;
|
||||
add_header Strict-Transport-Security "max-age=15552000; includeSubDomains" always;
|
||||
error_page 403 /core/templates/403.php;
|
||||
error_page 404 /core/templates/404.php;
|
||||
client_max_body_size ${cfg.maxUploadSize};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue