FIX: Don't crawl non-http/s links
This commit is contained in:
parent
558a274187
commit
ea9f93dcc5
|
@ -27,6 +27,8 @@ module Jobs
|
||||||
|
|
||||||
uri = URI(url)
|
uri = URI(url)
|
||||||
return if uri.blank? || uri.host.blank?
|
return if uri.blank? || uri.host.blank?
|
||||||
|
return unless ['https', 'http'].include?(uri.scheme)
|
||||||
|
|
||||||
headers = CrawlTopicLink.request_headers(uri)
|
headers = CrawlTopicLink.request_headers(uri)
|
||||||
head = Excon.head(url, read_timeout: 20, headers: headers)
|
head = Excon.head(url, read_timeout: 20, headers: headers)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue