mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2024-11-23 12:40:19 +01:00
ISSUE-223
This commit is contained in:
parent
e7380750f8
commit
6ac8ae20e3
1 changed files with 8 additions and 0 deletions
|
@ -230,6 +230,14 @@ func HttpAuthCredentials(user string, pass string) 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) {
|
||||
srvr.ipFilterOptions = &options
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue