mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-09-16 09:36:18 +02:00
Restore proxy support
This commit is contained in:
@@ -56,12 +56,14 @@ func (r *netReader) GrowBuf(s int) {
|
||||
}
|
||||
|
||||
func initDownloading() {
|
||||
transport := &http.Transport{}
|
||||
transport := &http.Transport{
|
||||
Proxy: http.ProxyFromEnvironment,
|
||||
}
|
||||
if conf.LocalFileSystemRoot != "" {
|
||||
transport.RegisterProtocol("local", http.NewFileTransport(http.Dir(conf.LocalFileSystemRoot)))
|
||||
}
|
||||
downloadClient = &http.Client{
|
||||
Timeout: time.Duration(conf.DownloadTimeout) * time.Second,
|
||||
Timeout: time.Duration(conf.DownloadTimeout) * time.Second,
|
||||
Transport: transport,
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user