mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-06 22:30:56 +03:00
replace strings.Split with SplitSeq
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -731,7 +731,7 @@ func GetRealIP(r *http.Request, header string, depth int) string {
|
||||
var ipAddresses []string
|
||||
|
||||
for _, h := range r.Header.Values(header) {
|
||||
for _, ipStr := range strings.Split(h, ",") {
|
||||
for ipStr := range strings.SplitSeq(h, ",") {
|
||||
ipStr = strings.TrimSpace(ipStr)
|
||||
ipAddresses = append(ipAddresses, ipStr)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user