mirror of
https://github.com/fatedier/frp.git
synced 2024-11-24 02:59:19 +08:00
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
This commit is contained in:
parent
2af2cf7dbd
commit
9152c59570
@ -175,6 +175,9 @@ func transformHeadersFromPluginParams(params map[string]string) v1.HeaderOperati
|
||||
continue
|
||||
}
|
||||
if k = strings.TrimPrefix(k, "plugin_header_"); k != "" {
|
||||
if out.Set == nil {
|
||||
out.Set = make(map[string]string)
|
||||
}
|
||||
out.Set[k] = v
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user