Explorar o código

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

zhouwenfeng %!s(int64=5) %!d(string=hai) anos
pai
achega
ff357882ac
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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)
 			}
 		},
 	}