mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 02:41:13 +08:00
DEV: Load SVG sprites during system spec runs (#19497)
Co-authored-by: David Taylor <david@taylorhq.com>
This commit is contained in:
@ -498,16 +498,20 @@ module Discourse
|
||||
SiteSetting.force_https? ? "https" : "http"
|
||||
end
|
||||
|
||||
def self.base_url_no_prefix
|
||||
def self.current_hostname_with_port
|
||||
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
|
||||
result = +"#{current_hostname}"
|
||||
result << ":#{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}"
|
||||
result << ":#{ENV["UNICORN_PORT"] || 3000}"
|
||||
end
|
||||
|
||||
url
|
||||
result
|
||||
end
|
||||
|
||||
def self.base_url_no_prefix
|
||||
"#{base_protocol}://#{current_hostname_with_port}"
|
||||
end
|
||||
|
||||
def self.base_url
|
||||
|
Reference in New Issue
Block a user