mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 14:50:55 +03:00
add a new configuration section for HTTP clients
HTTP clients are used for executing hooks such as the ones used for custom actions, external authentication and pre-login user modifications. This allows, for example, to use self-signed certificate without defeating the purpose of using TLS
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
|
||||
"github.com/drakkan/sftpgo/config"
|
||||
"github.com/drakkan/sftpgo/dataprovider"
|
||||
"github.com/drakkan/sftpgo/httpclient"
|
||||
"github.com/drakkan/sftpgo/httpd"
|
||||
"github.com/drakkan/sftpgo/sftpd"
|
||||
)
|
||||
@@ -36,6 +37,10 @@ func TestLoadConfigTest(t *testing.T) {
|
||||
if config.GetSFTPDConfig().BindPort == emptySFTPDConf.BindPort {
|
||||
t.Errorf("error loading SFTPD conf")
|
||||
}
|
||||
emptyHTTPConfig := httpclient.Config{}
|
||||
if config.GetHTTPConfig().Timeout == emptyHTTPConfig.Timeout {
|
||||
t.Errorf("error loading HTTP conf")
|
||||
}
|
||||
confName := tempConfigName + ".json"
|
||||
configFilePath := filepath.Join(configDir, confName)
|
||||
err = config.LoadConfig(configDir, tempConfigName)
|
||||
|
||||
Reference in New Issue
Block a user