Forráskód Böngészése

allow additionalbrower matches (#2542)

Stavros Kois 1 éve
szülő
commit
a7e9917153

+ 1 - 1
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.26
+version: 1.0.27
 apiVersion: v2
 appVersion: 2.4.59
 kubeVersion: '>=1.16.0-0'

+ 18 - 0
library/ix-dev/community/webdav/questions.yaml

@@ -43,6 +43,24 @@ questions:
             show_if: [["authType", "=", "basic"]]
             private: true
             required: true
+        - variable: additionalBrowserMatches
+          label: Additional Browser Matches
+          description: |
+            Additional browser matches for WebDAV.</br>
+            This is useful if you want to use WebDAV with a browser
+            that is not supported by the default configuration.</br>
+            Example: "^some-regex" </br>
+            This will create the following line in the configuration file:</br>
+            BrowserMatch "^some-regex" redirect-carefully
+          schema:
+            type: list
+            default: []
+            items:
+              - variable: match
+                label: Match
+                schema:
+                  type: string
+                  required: true
         - variable: additionalEnvs
           label: Additional Environment Variables
           description: Configure additional environment variables for WebDAV.

+ 4 - 0
library/ix-dev/community/webdav/templates/_helper.tpl

@@ -69,7 +69,11 @@ BrowserMatch "^WebDAVFS/1.[01234]" redirect-carefully
 BrowserMatch "^gnome-vfs/1.0" redirect-carefully
 BrowserMatch "^XML Spy" redirect-carefully
 BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully
+BrowserMatch "^DAVx5" redirect-carefully
 BrowserMatch " Konqueror/4" redirect-carefully
+{{- range $match := .Values.webdavConfig.additionalBrowserMatches }}
+BrowserMatch "{{ $match }}" redirect-carefully
+{{- end }}
 RequestReadTimeout handshake=0 header=20-40,MinRate=500 body=20,MinRate=500
 {{- end -}}
 

+ 3 - 2
library/ix-dev/community/webdav/values.yaml

@@ -10,8 +10,9 @@ resources:
 
 webdavConfig:
   authType: none
-  username: ''
-  password: ''
+  username: ""
+  password: ""
+  additionalBrowserMatches: []
   additionalEnvs: []
 webdavNetwork:
   hostNetwork: false