|
|
|
@ -113,6 +113,11 @@ module CartoDB
|
|
|
|
|
@@request_host=value
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def self.protocol(protocol_override=nil)
|
|
|
|
|
default_protocol = self.use_https? ? 'https' : 'http'
|
|
|
|
|
protocol_override.nil? ? default_protocol : protocol_override
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
# "private" methods, not intended for direct usage
|
|
|
|
|
# ------------------------------------------------
|
|
|
|
|
|
|
|
|
@ -135,11 +140,6 @@ module CartoDB
|
|
|
|
|
@@https_port = self.get_https_port
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def self.protocol(protocol_override=nil)
|
|
|
|
|
default_protocol = self.use_https? ? 'https' : 'http'
|
|
|
|
|
protocol_override.nil? ? default_protocol : protocol_override
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def self.subdomain_based_base_url(subdomain, org_username=nil, protocol_override=nil)
|
|
|
|
|
protocol = self.protocol(protocol_override)
|
|
|
|
|
base_url ="#{protocol}://#{subdomain}#{self.session_domain}#{protocol == 'http' ? self.http_port : self.https_port}"
|
|
|
|
|