@@ -81,17 +81,16 @@ def sync(params)
81
81
82
82
private
83
83
def get_default_region_hosts ( region = 'us' )
84
-
85
- host = "#{ Contentstack ::Region ::PROTOCOL } ://#{ Contentstack ::Region ::DEFAULT_HOST } " #set default host if region is nil
84
+ host = "#{ Contentstack ::Region ::PROTOCOL } #{ Contentstack ::Region ::DEFAULT_HOST } " #set default host if region is nil
86
85
case region
87
86
when "us"
88
- host = "#{ Contentstack ::Region ::PROTOCOL } :// #{ Contentstack ::Region ::DEFAULT_HOST } "
87
+ host = "#{ Contentstack ::Region ::PROTOCOL } #{ Contentstack ::Region ::DEFAULT_HOST } "
89
88
when "eu"
90
- host = "#{ Contentstack ::Region ::PROTOCOL } :// eu-cdn.#{ Contentstack ::Region ::HOST } "
89
+ host = "#{ Contentstack ::Region ::PROTOCOL } eu-cdn.#{ Contentstack ::Region ::HOST } "
91
90
when "azure-na"
92
- host = "#{ Contentstack ::Region ::PROTOCOL } :// azure-na-cdn.#{ Contentstack ::Region ::HOST } "
91
+ host = "#{ Contentstack ::Region ::PROTOCOL } azure-na-cdn.#{ Contentstack ::Region ::HOST } "
93
92
when "azure-eu"
94
- host = "#{ Contentstack ::Region ::PROTOCOL } :// azure-eu-cdn.#{ Contentstack ::Region ::HOST } "
93
+ host = "#{ Contentstack ::Region ::PROTOCOL } azure-eu-cdn.#{ Contentstack ::Region ::HOST } "
95
94
end
96
95
host
97
96
end
@@ -103,19 +102,19 @@ def get_host_by_region(region, options)
103
102
custom_host = options [ :host ]
104
103
case region
105
104
when "us"
106
- host = "#{ Contentstack ::Region ::PROTOCOL } :// cdn.#{ custom_host } "
105
+ host = "#{ Contentstack ::Region ::PROTOCOL } cdn.#{ custom_host } "
107
106
when "eu"
108
- host = "#{ Contentstack ::Region ::PROTOCOL } :// eu-cdn.#{ custom_host } "
107
+ host = "#{ Contentstack ::Region ::PROTOCOL } eu-cdn.#{ custom_host } "
109
108
when "azure-na"
110
- host = "#{ Contentstack ::Region ::PROTOCOL } :// azure-na-cdn.#{ custom_host } "
109
+ host = "#{ Contentstack ::Region ::PROTOCOL } azure-na-cdn.#{ custom_host } "
111
110
when "azure-eu"
112
- host = "#{ Contentstack ::Region ::PROTOCOL } :// azure-eu-cdn.#{ custom_host } "
111
+ host = "#{ Contentstack ::Region ::PROTOCOL } azure-eu-cdn.#{ custom_host } "
113
112
end
114
113
elsif options [ :host ] . present? && region . empty?
115
114
custom_host = options [ :host ]
116
- host = "#{ Contentstack ::Region ::PROTOCOL } :// cdn.#{ custom_host } "
115
+ host = "#{ Contentstack ::Region ::PROTOCOL } cdn.#{ custom_host } "
117
116
else
118
- host = "#{ Contentstack ::Region ::PROTOCOL } :// #{ Contentstack ::Region ::DEFAULT_HOST } " #set default host if region and host is empty
117
+ host = "#{ Contentstack ::Region ::PROTOCOL } #{ Contentstack ::Region ::DEFAULT_HOST } " #set default host if region and host is empty
119
118
end
120
119
host
121
120
end
0 commit comments