webdav: add prefix support

This commit is contained in:
Nicola Murino
2021-03-07 17:10:45 +01:00
parent 1ab02d5891
commit 4c658bb6f0
9 changed files with 25 additions and 3 deletions

View File

@@ -203,6 +203,7 @@ func (s *webDavServer) ServeHTTP(w http.ResponseWriter, r *http.Request) {
}
handler := webdav.Handler{
Prefix: s.binding.Prefix,
FileSystem: connection,
LockSystem: lockSystem,
Logger: writeLog,

View File

@@ -86,6 +86,9 @@ type Binding struct {
// any invalid name will be silently ignored.
// The order matters, the ciphers listed first will be the preferred ones.
TLSCipherSuites []string `json:"tls_cipher_suites" mapstructure:"tls_cipher_suites"`
// Prefix for WebDAV resources, if empty WebDAV resources will be available at the
// root ("/") URI. If defined it must be an absolute URI.
Prefix string `json:"prefix" mapstructure:"prefix"`
}
func (b *Binding) isMutualTLSEnabled() bool {