mirror of
https://github.com/discourse/discourse.git
synced 2025-02-07 20:08:26 +00:00
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…
x
Reference in New Issue
Block a user