Compare commits

..

No commits in common. "95028e9c2c5ca388dd4ab183d70ce354def942bc" and "e00916cb398f2604aef5f1039cbf555b3ce62951" have entirely different histories.

View File

@ -170,17 +170,18 @@ func Convert_ServerCommonConf_To_v1(conf *ServerCommonConf) *v1.ServerConfig {
func transformHeadersFromPluginParams(params map[string]string) v1.HeaderOperations {
out := v1.HeaderOperations{}
set := make(map[string]string)
for k, v := range params {
if !strings.HasPrefix(k, "plugin_header_") {
continue
}
if k = strings.TrimPrefix(k, "plugin_header_"); k != "" {
if out.Set == nil {
out.Set = make(map[string]string)
}
out.Set[k] = v
set[k] = v
}
}
if len(set) > 0 {
out.Set = set
}
return out
}