mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: do not treat ignore_redirects domains as blacklisted
This fix prevents domains present in `ignore_redirects` to be treated as blacklisted domains and makes sure that onboxing happens for those domains. Issue reported here: https://meta.discourse.org/t/steam-store-oneboxing-no-longer-works/97266
This commit is contained in:
@@ -116,4 +116,12 @@ describe Oneboxer do
|
||||
expect(Oneboxer.external_onebox('https://discourse.org/')[:onebox]).to be_empty
|
||||
end
|
||||
|
||||
it "does not consider ignore_redirects domains as blacklisted" do
|
||||
url = 'https://store.steampowered.com/app/271590/Grand_Theft_Auto_V/'
|
||||
stub_request(:head, url).to_return(status: 200, body: "", headers: {})
|
||||
stub_request(:get, url).to_return(status: 200, body: "", headers: {})
|
||||
|
||||
expect(Oneboxer.external_onebox(url)[:onebox]).to be_present
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user