[Bug Report] ReadImageFromURL lacks proxy support
Closed this issue · 0 comments
dani commented
Describe the bug
When importing a performer after a successful stashdb lookup for example, a request is made to fetch the corresponding image. But this request lacks outbound proxy support, and fails if direct connection is not allowed.
To Reproduce
Steps to reproduce the behavior:
- Setup stash with an oubound proxy, and ensure direct connection is denied
- Lookup a scene with stashdb
- Try to import a performer
- See error
Expected behavior
Request should be made through the proxy, so the performer can be imported
Stash Version: (from Settings -> About):
0.24.3
Desktop (please complete the following information):
- OS: Fedora
- Browser Brave
- Version 1.63.162
Additional context
The problem is the http client is instancied without proxy config in pkg/utils/image.go -> ReadImageFromURL
client := &http.Client{
Transport: &http.Transport{ // ignore insecure certificates
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
},
Timeout: imageGetTimeout,
}
I'm not a Go guy, but I guess it just lacks the proxy bit, like
client := &http.Client{
Transport: &http.Transport{ // ignore insecure certificates
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
Proxy: http.ProxyFromEnvironment
},
Timeout: imageGetTimeout,
}