mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 17:33:37 +08:00
17 lines
452 B
Ruby
17 lines
452 B
Ruby
# frozen_string_literal: true
|
|
|
|
if Rails.env.development? && SiteSetting.port.to_i > 0
|
|
Onebox.options = {
|
|
twitter_client: TwitterApi,
|
|
redirect_limit: 3,
|
|
user_agent: "Discourse Forum Onebox v#{Discourse::VERSION::STRING}",
|
|
allowed_ports: [80, 443, SiteSetting.port.to_i]
|
|
}
|
|
else
|
|
Onebox.options = {
|
|
twitter_client: TwitterApi,
|
|
redirect_limit: 3,
|
|
user_agent: "Discourse Forum Onebox v#{Discourse::VERSION::STRING}"
|
|
}
|
|
end
|