Skip to content

Commit

Permalink
fix(nginx): add option to easy set HSTS
Browse files Browse the repository at this point in the history
Signed-off-by: WrenIX <[email protected]>
  • Loading branch information
wrenix committed Oct 11, 2024
1 parent f184134 commit 2e6a7c6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/nextcloud/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: nextcloud
version: 6.1.0
version: 6.2.0
appVersion: 30.0.0
description: A file sharing server that puts the control and security of your own data back into your hands.
keywords:
Expand Down
4 changes: 3 additions & 1 deletion charts/nextcloud/files/nginx.config.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ server {
# 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;
{{- with .Values.nginx.config.header.hsts }}
add_header Strict-Transport-Security {{ . | quote }} always;
{{- end }}

# set max upload size
client_max_body_size 10G;
Expand Down
10 changes: 10 additions & 0 deletions charts/nextcloud/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,16 @@ nginx:
config:
# This generates the default nginx config as per the nextcloud documentation
default: true
header:
# -- HSTS settings
# WARNING: Only add the preload option once you read about
# the consequences in https://hstspreload.org/. This option
# 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.
# example: hsts: "max-age=15768000; includeSubDomains; preload;"
hsts:

custom:
# custom: |-
# worker_processes 1;..
Expand Down

0 comments on commit 2e6a7c6

Please sign in to comment.