mirror of
https://github.com/fatedier/frp.git
synced 2025-06-17 00:38:22 +00:00
Compare commits
No commits in common. "95028e9c2c5ca388dd4ab183d70ce354def942bc" and "e00916cb398f2604aef5f1039cbf555b3ce62951" have entirely different histories.
95028e9c2c
...
e00916cb39
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user