2019-05-02 18:17:27 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2022-03-21 10:28:52 -04:00
|
|
|
Rails.application.config.to_prepare do
|
|
|
|
if Rails.env.development? && SiteSetting.port.to_i > 0
|
|
|
|
Onebox.options = {
|
|
|
|
twitter_client: TwitterApi,
|
|
|
|
redirect_limit: 3,
|
2024-07-23 19:15:30 -04:00
|
|
|
user_agent: "Discourse Forum Onebox",
|
2022-03-21 10:28:52 -04:00
|
|
|
allowed_ports: [80, 443, SiteSetting.port.to_i],
|
|
|
|
}
|
|
|
|
else
|
|
|
|
Onebox.options = {
|
|
|
|
twitter_client: TwitterApi,
|
|
|
|
redirect_limit: 3,
|
2024-07-23 19:15:30 -04:00
|
|
|
user_agent: "Discourse Forum Onebox",
|
2022-03-21 10:28:52 -04:00
|
|
|
}
|
|
|
|
end
|
2019-11-07 05:12:11 -05:00
|
|
|
end
|