mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 15:06:26 +08:00
DEV: Fix missing port in URLs in development mode.
This commit is contained in:
parent
267d129f38
commit
b7b9960558
|
@ -263,6 +263,11 @@ module Discourse
|
|||
default_port = SiteSetting.force_https? ? 443 : 80
|
||||
url = "#{base_protocol}://#{current_hostname}"
|
||||
url << ":#{SiteSetting.port}" if SiteSetting.port.to_i > 0 && SiteSetting.port.to_i != default_port
|
||||
|
||||
if Rails.env.development? && SiteSetting.port.blank?
|
||||
url << ":#{ENV["UNICORN_PORT"] || 3000}"
|
||||
end
|
||||
|
||||
url
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user