proxy/router: respect http proxy environment variables

pull/112/head
Sebastian Widmer 2019-09-04 14:46:05 +02:00 committed by kun
parent 5aa10edcd3
commit c0bf100266
1 changed files with 1 additions and 0 deletions

View File

@ -59,6 +59,7 @@ func NewRouter(srv *Server, opts *RouterOptions) *Router {
rt.proxy = proxy rt.proxy = proxy
rt.proxy.Transport = &http.Transport{ rt.proxy.Transport = &http.Transport{
Proxy: http.ProxyFromEnvironment,
TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
} }
rt.proxy.ModifyResponse = func(r *http.Response) error { rt.proxy.ModifyResponse = func(r *http.Response) error {