mirror of
https://github.com/truenas/charts.git
synced 2026-04-04 19:29:22 +08:00
webdav: handle 0 in limitReqBody correctly (#2484)
This commit is contained in:
@@ -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.24
|
||||
version: 1.0.25
|
||||
apiVersion: v2
|
||||
appVersion: 2.4.59
|
||||
kubeVersion: '>=1.16.0-0'
|
||||
|
||||
@@ -11,6 +11,7 @@ webdavStorage:
|
||||
description: My second share
|
||||
hostPath: /mnt/{{.Release.Name }}/share2
|
||||
readOnly: false
|
||||
maxRequestBodySizeInGB: 0
|
||||
fixPermissions: true
|
||||
- name: share3
|
||||
enabled: false
|
||||
|
||||
@@ -45,7 +45,11 @@ DavLockDB "/usr/local/apache2/var/DavLock"
|
||||
# Description: {{ .description }}
|
||||
Alias /{{ .name }} "/{{ include "webdav.shares.prefix" $ }}/{{ .name }}"
|
||||
<Directory "/{{ include "webdav.shares.prefix" $ }}/{{ .name }}">
|
||||
LimitRequestBody {{ mul (.maxRequestBodySizeInGB | default 1) $bytesGB }}
|
||||
{{- $maxReqBody := 1 -}}
|
||||
{{- if not (kindIs "invalid" .maxRequestBodySizeInGB) -}}
|
||||
{{- $maxReqBody = mul .maxRequestBodySizeInGB $bytesGB -}}
|
||||
{{- end }}
|
||||
LimitRequestBody {{ $maxReqBody }}
|
||||
</Directory>
|
||||
{{- if .readOnly }}
|
||||
<Location "/{{ .name }}">
|
||||
|
||||
Reference in New Issue
Block a user