mirror of
https://github.com/discourse/discourse.git
synced 2025-01-19 10:52:45 +08: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)
|
||||
return if uri.blank? || uri.host.blank?
|
||||
return unless ['https', 'http'].include?(uri.scheme)
|
||||
|
||||
headers = CrawlTopicLink.request_headers(uri)
|
||||
head = Excon.head(url, read_timeout: 20, headers: headers)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user