1
0
mirror of https://github.com/drakkan/sftpgo.git synced 2025-11-29 22:08:10 +02:00

get binding from env: respect the documented default

Fixes #377
This commit is contained in:
Nicola Murino
2021-04-16 13:35:13 +02:00
parent 21fbcf4556
commit 683ba6cd5b

View File

@@ -549,7 +549,9 @@ func loadBindingsFromEnv() {
}
func getSFTPDBindindFromEnv(idx int) {
binding := sftpd.Binding{}
binding := sftpd.Binding{
ApplyProxyConfig: true,
}
if len(globalConf.SFTPD.Bindings) > idx {
binding = globalConf.SFTPD.Bindings[idx]
}
@@ -584,7 +586,9 @@ func getSFTPDBindindFromEnv(idx int) {
}
func getFTPDBindingFromEnv(idx int) {
binding := ftpd.Binding{}
binding := ftpd.Binding{
ApplyProxyConfig: true,
}
if len(globalConf.FTPD.Bindings) > idx {
binding = globalConf.FTPD.Bindings[idx]
}