mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2020-11-18 19:53:40 -08:00
ISSUE-223
This commit is contained in:
parent
e7380750f8
commit
6ac8ae20e3
@ -230,6 +230,14 @@ func HttpAuthCredentials(user string, pass string) OptionFn {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func FilterOptions(options IPFilterOptions) OptionFn {
|
func FilterOptions(options IPFilterOptions) OptionFn {
|
||||||
|
for i, allowedIP := range options.AllowedIPs {
|
||||||
|
options.AllowedIPs[i] = strings.TrimSpace(allowedIP)
|
||||||
|
}
|
||||||
|
|
||||||
|
for i, blockedIP := range options.BlockedIPs {
|
||||||
|
options.BlockedIPs[i] = strings.TrimSpace(blockedIP)
|
||||||
|
}
|
||||||
|
|
||||||
return func(srvr *Server) {
|
return func(srvr *Server) {
|
||||||
srvr.ipFilterOptions = &options
|
srvr.ipFilterOptions = &options
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user