chore: Dumb prealloc lint fix (#7430)

This commit is contained in:
Francis Lavoie
2026-01-13 14:13:43 -05:00
committed by GitHub
parent 28103aafba
commit 90972fbebc
8 changed files with 17 additions and 6 deletions
+1
View File
@@ -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)...)