diff options
| author | Philipp Tanlak <philipp.tanlak@gmail.com> | 2024-01-10 21:12:03 +0100 |
|---|---|---|
| committer | Philipp Tanlak <philipp.tanlak@gmail.com> | 2024-01-10 21:12:03 +0100 |
| commit | 60139e7de275473332b560b4139a6a01c3da184c (patch) | |
| tree | 50f55a2633176770b8212f3bcd00981c713be885 /modules | |
| parent | 8ad9f9f66af1452b1a4875d755e7f18154c3f18a (diff) | |
Fix addition of invalid proxy url
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/proxy/proxy.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/proxy/proxy.go b/modules/proxy/proxy.go index ff9aa5c..832bc7a 100644 --- a/modules/proxy/proxy.go +++ b/modules/proxy/proxy.go @@ -37,6 +37,9 @@ func (m *Module) Provision(ctx flyscrape.Context) { } for _, purl := range append(m.Proxies, m.Proxy) { + if purl == "" { + continue + } if parsed, err := url.Parse(purl); err == nil { m.transports = append(m.transports, &http.Transport{ Proxy: http.ProxyURL(parsed), |