validate will send forem feeds importer user agent, just like import (#16925)
follow on to #15942 which enabled downloading existing DEV feeds, this allows setting a feed url to DEV. It's possible this user agent should be brought inline with the tags choice of community name and url, but in the short term I'm making this consistent with the existing feed importer.
This commit is contained in:
parent
d12d3b3ef1
commit
6869917904
1 changed files with 3 additions and 1 deletions
|
|
@ -11,7 +11,9 @@ module Feeds
|
|||
def call
|
||||
return false if feed_url.blank?
|
||||
|
||||
xml = HTTParty.get(feed_url, timeout: 10).body
|
||||
xml = HTTParty.get(feed_url,
|
||||
timeout: 10,
|
||||
headers: { "User-Agent" => "Forem Feeds Importer" }).body
|
||||
Feedjira.parse(xml)
|
||||
|
||||
true
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue