mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 23:00:55 +03:00
parse IP proxy header also if listening on UNIX domain socket
Fixes #867 Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -109,6 +109,11 @@ type Binding struct {
|
||||
}
|
||||
|
||||
func (b *Binding) parseAllowedProxy() error {
|
||||
if filepath.IsAbs(b.Address) && len(b.ProxyAllowed) > 0 {
|
||||
// unix domain socket
|
||||
b.allowHeadersFrom = []func(net.IP) bool{func(ip net.IP) bool { return true }}
|
||||
return nil
|
||||
}
|
||||
allowedFuncs, err := util.ParseAllowedIPAndRanges(b.ProxyAllowed)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user