mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-08 07:10:56 +03:00
httpd: allow to restrict allowed hosts ...
... and to add security headers to the responses Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -338,6 +338,15 @@ func TestMain(m *testing.M) {
|
||||
httpdConf := config.GetHTTPDConfig()
|
||||
|
||||
httpdConf.Bindings[0].Port = 8081
|
||||
httpdConf.Bindings[0].Security = httpd.SecurityConf{
|
||||
Enabled: true,
|
||||
HTTPSProxyHeaders: []httpd.HTTPSProxyHeader{
|
||||
{
|
||||
Key: "X-Forwarded-Proto",
|
||||
Value: "https",
|
||||
},
|
||||
},
|
||||
}
|
||||
httpdtest.SetBaseURL(httpBaseURL)
|
||||
backupsPath = filepath.Join(os.TempDir(), "test_backups")
|
||||
httpdConf.BackupsPath = backupsPath
|
||||
|
||||
Reference in New Issue
Block a user