소스 검색

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

zhouwenfeng 5 년 전
부모
커밋
ff357882ac
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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
 			}
 			for k, v := range p.headers {
-				req.Header.Add(k, v)
+				req.Header.Set(k, v)
 			}
 		},
 	}