diff --git a/library/ix-dev/community/webdav/Chart.yaml b/library/ix-dev/community/webdav/Chart.yaml index 94cd26c373..24d3524fa1 100644 --- a/library/ix-dev/community/webdav/Chart.yaml +++ b/library/ix-dev/community/webdav/Chart.yaml @@ -4,7 +4,7 @@ description: WebDAV is a set of extensions to the HTTP protocol which allows use annotations: title: WebDAV type: application -version: 1.0.23 +version: 1.0.24 apiVersion: v2 appVersion: 2.4.59 kubeVersion: '>=1.16.0-0' diff --git a/library/ix-dev/community/webdav/ci/http-basicauth-values.yaml b/library/ix-dev/community/webdav/ci/http-basicauth-values.yaml index e4eca9e373..6ba00655a9 100644 --- a/library/ix-dev/community/webdav/ci/http-basicauth-values.yaml +++ b/library/ix-dev/community/webdav/ci/http-basicauth-values.yaml @@ -17,6 +17,7 @@ webdavStorage: description: My third disabled share hostPath: /mnt/{{.Release.Name }}/share3 readOnly: true + maxRequestBodySizeInGB: 10 fixPermissions: false webdavNetwork: diff --git a/library/ix-dev/community/webdav/questions.yaml b/library/ix-dev/community/webdav/questions.yaml index b62bc6a7bf..80b9d13860 100644 --- a/library/ix-dev/community/webdav/questions.yaml +++ b/library/ix-dev/community/webdav/questions.yaml @@ -180,8 +180,8 @@ questions: Example: [share1] will be available at [http://:/share1] schema: type: string - valid_chars: '^[a-zA-Z0-9_-]+$' - valid_chars_error: 'Share name can only consist of [Letters(a-z, A-Z), Numbers(0-9), Underscores(_), Dashes(-)]' + valid_chars: "^[a-zA-Z0-9_-]+$" + valid_chars_error: "Share name can only consist of [Letters(a-z, A-Z), Numbers(0-9), Underscores(_), Dashes(-)]" required: true - variable: description label: Description @@ -203,6 +203,15 @@ questions: schema: type: boolean default: false + - variable: maxRequestBodySizeInGB + label: Max Request Body Size (in GB) + description: | + The maximum size of the request body in GB. + If the request body size exceeds this value, the request will fail. + Value of 0 means no limit. + schema: + type: int + default: 1 - variable: fixPermissions label: Fix Permissions description: | diff --git a/library/ix-dev/community/webdav/templates/_helper.tpl b/library/ix-dev/community/webdav/templates/_helper.tpl index 99929af967..d28670a63a 100644 --- a/library/ix-dev/community/webdav/templates/_helper.tpl +++ b/library/ix-dev/community/webdav/templates/_helper.tpl @@ -39,11 +39,13 @@ DavLockDB "/usr/local/apache2/var/DavLock" Options Indexes FollowSymLinks {{- range .Values.webdavStorage.shares }} + {{ $bytesGB := 1073741824 }} {{- if .enabled }} # WebDav Share - {{ .name }} # Description: {{ .description }} Alias /{{ .name }} "/{{ include "webdav.shares.prefix" $ }}/{{ .name }}" + LimitRequestBody {{ mul (.maxRequestBodySizeInGB | default 1) $bytesGB }} {{- if .readOnly }}