Browse Source

use Set() instead of Add() when attaching additional headers

zhouwenfeng 5 years ago
parent
commit
ff357882ac
1 changed files with 1 additions and 1 deletions
  1. 1 1
      models/plugin/https2http.go

+ 1 - 1
models/plugin/https2http.go

@@ -86,7 +86,7 @@ func NewHTTPS2HTTPPlugin(params map[string]string) (Plugin, error) {
 				req.Host = p.hostHeaderRewrite
 				req.Host = p.hostHeaderRewrite
 			}
 			}
 			for k, v := range p.headers {
 			for k, v := range p.headers {
-				req.Header.Add(k, v)
+				req.Header.Set(k, v)
 			}
 			}
 		},
 		},
 	}
 	}