mirror of
https://github.com/caddyserver/caddy.git
synced 2026-05-21 22:36:32 -04:00
chore: Dumb prealloc lint fix (#7430)
This commit is contained in:
@@ -1010,6 +1010,7 @@ func isTrustedClientIP(ipAddr netip.Addr, trusted []netip.Prefix) bool {
|
||||
// then the first value from those headers is used.
|
||||
func trustedRealClientIP(r *http.Request, headers []string, clientIP string) string {
|
||||
// Read all the values of the configured client IP headers, in order
|
||||
// nolint:prealloc
|
||||
var values []string
|
||||
for _, field := range headers {
|
||||
values = append(values, r.Header.Values(field)...)
|
||||
|
||||
Reference in New Issue
Block a user