fix nil map error when using plugin headers in legacy format (#3996)

* fix nil map error when using plugin headers in legacy format

* create map on demand

* better initialization
pull/4000/head
Gerhard Tan 9 months ago committed by GitHub
parent 2af2cf7dbd
commit 9152c59570
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -175,6 +175,9 @@ func transformHeadersFromPluginParams(params map[string]string) v1.HeaderOperati
continue continue
} }
if k = strings.TrimPrefix(k, "plugin_header_"); k != "" { if k = strings.TrimPrefix(k, "plugin_header_"); k != "" {
if out.Set == nil {
out.Set = make(map[string]string)
}
out.Set[k] = v out.Set[k] = v
} }
} }

Loading…
Cancel
Save