mirror of
https://github.com/fatedier/frp.git
synced 2025-05-11 17:38:26 +00:00
Compare commits
2 Commits
e00916cb39
...
95028e9c2c
Author | SHA1 | Date | |
---|---|---|---|
|
95028e9c2c | ||
|
4811166782 |
@ -170,18 +170,17 @@ 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 != "" {
|
||||
set[k] = v
|
||||
if out.Set == nil {
|
||||
out.Set = make(map[string]string)
|
||||
}
|
||||
out.Set[k] = v
|
||||
}
|
||||
}
|
||||
if len(set) > 0 {
|
||||
out.Set = set
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user