mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 06:40:54 +03:00
portable mode: fix WebDAV support
This commit is contained in:
@@ -94,6 +94,7 @@ func (s *Service) StartPortableMode(sftpdPort, ftpPort, webdavPort int, enabledS
|
|||||||
} else {
|
} else {
|
||||||
binding.Port = 49152 + rand.Intn(15000)
|
binding.Port = 49152 + rand.Intn(15000)
|
||||||
}
|
}
|
||||||
|
webDavConf.Bindings = []webdavd.Binding{binding}
|
||||||
webDavConf.CertificateFile = webDavCert
|
webDavConf.CertificateFile = webDavCert
|
||||||
webDavConf.CertificateKeyFile = webDavKey
|
webDavConf.CertificateKeyFile = webDavKey
|
||||||
config.SetWebDAVDConfig(webDavConf)
|
config.SetWebDAVDConfig(webDavConf)
|
||||||
@@ -126,8 +127,7 @@ func (s *Service) getServiceOptionalInfoString() string {
|
|||||||
if config.GetWebDAVDConfig().CertificateFile != "" && config.GetWebDAVDConfig().CertificateKeyFile != "" {
|
if config.GetWebDAVDConfig().CertificateFile != "" && config.GetWebDAVDConfig().CertificateKeyFile != "" {
|
||||||
scheme = "https"
|
scheme = "https"
|
||||||
}
|
}
|
||||||
info.WriteString(fmt.Sprintf("WebDAV URL: %v://<your IP>:%v/%v",
|
info.WriteString(fmt.Sprintf("WebDAV URL: %v://<your IP>:%v/", scheme, config.GetWebDAVDConfig().Bindings[0].Port))
|
||||||
scheme, config.GetWebDAVDConfig().Bindings[0].Port, s.PortableUser.Username))
|
|
||||||
}
|
}
|
||||||
return info.String()
|
return info.String()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user