mirror of
https://github.com/drakkan/sftpgo.git
synced 2026-03-14 14:25:52 +01:00
replace strings.Split with SplitSeq
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
parent
60af36813b
commit
b6873768b2
7 changed files with 8 additions and 8 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue