mirror of https://github.com/goproxyio/goproxy
proxy/router: respect http proxy environment variables
parent
5aa10edcd3
commit
c0bf100266
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue