http: support setting headers

This commit is contained in:
fatedier
2018-05-20 23:22:07 +08:00
parent 0c35273759
commit db2d1fce76
6 changed files with 56 additions and 17 deletions

View File

@@ -225,6 +225,7 @@ type HttpProxy struct {
func (pxy *HttpProxy) Run() (remoteAddr string, err error) {
routeConfig := vhost.VhostRouteConfig{
RewriteHost: pxy.cfg.HostHeaderRewrite,
Headers: pxy.cfg.Headers,
Username: pxy.cfg.HttpUser,
Password: pxy.cfg.HttpPwd,
CreateConnFn: pxy.GetRealConn,