mirror of
https://github.com/discourse/discourse.git
synced 2025-03-26 12:05:39 +08:00
FEATURE: Enable inline onebox for all domains by default (#11523)
This commit is contained in:
parent
6380a0a250
commit
2d667a3bd0
@ -1605,7 +1605,7 @@ onebox:
|
||||
type: list
|
||||
list_type: compact
|
||||
enable_inline_onebox_on_all_domains:
|
||||
default: false
|
||||
default: true
|
||||
force_custom_user_agent_hosts:
|
||||
default: "http://codepen.io"
|
||||
type: list
|
||||
|
@ -42,6 +42,9 @@ class InlineOneboxer
|
||||
opts[:post_author] = post_author_for_title(topic, post_number)
|
||||
end
|
||||
return onebox_for(url, topic.title, opts)
|
||||
else
|
||||
# not permitted to see topic
|
||||
return nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -148,6 +148,7 @@ describe InlineOneboxer do
|
||||
end
|
||||
|
||||
it "will not crawl domains that aren't allowlisted" do
|
||||
SiteSetting.enable_inline_onebox_on_all_domains = false
|
||||
onebox = InlineOneboxer.lookup("https://eviltrout.com", skip_cache: true)
|
||||
expect(onebox).to be_blank
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user