fixed windshaft provider with https
This commit is contained in:
parent
920d22ad70
commit
8211285a4c
@ -331,7 +331,10 @@
|
||||
if (!this.options.cdn_url) {
|
||||
return this._tilerHost();
|
||||
}
|
||||
var h = protocol + "://{s}.";
|
||||
var h = protocol + "://"
|
||||
if (protocol === 'http') {
|
||||
h += "{s}.";
|
||||
}
|
||||
var cdn_host = opts.cdn_url;
|
||||
if(!cdn_host.http && !cdn_host.https) {
|
||||
throw new Error("cdn_host should contain http and/or https entries");
|
||||
|
@ -38,7 +38,7 @@ module('provider.windshaft', {
|
||||
"layers": [{
|
||||
"type": "torque",
|
||||
"options": {
|
||||
"cartocss_version": "2.1.1",
|
||||
"cartocss_version": "1.0.0",
|
||||
"cartocss": '#test{}',
|
||||
"sql": 'test'
|
||||
}
|
||||
@ -60,6 +60,12 @@ module('provider.windshaft', {
|
||||
equal(windshaft.url(), "http://{s}.cartocdn.com/rambo");
|
||||
});
|
||||
|
||||
test("url cdn https", function() {
|
||||
windshaft.options.tiler_protocol = 'https';
|
||||
windshaft.options.cdn_url = { https: 'cartocdn.com' };
|
||||
equal(windshaft.url(), "https://cartocdn.com/rambo");
|
||||
});
|
||||
|
||||
test("named map", function() {
|
||||
windshaft_named = new torque.providers.windshaft({
|
||||
table: 'test',
|
||||
|
Loading…
Reference in New Issue
Block a user