Skip to content

Commit 57a61a2

Browse files
author
Mart Sõmermaa
committed
Fix cutting-room-floor#152: add HTTPS support by removing hard-coded protocol
1 parent 61e85fc commit 57a61a2

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

models/Tileset.server.bones

+3-6
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,20 @@ models.Tileset.syncread = function(data, options) {
77
data.tiles = data.tiles || _(options.tileHost).map(function(host) {
88
return url.format({
99
host: host,
10-
pathname: options.basepath + 'v2/' + data.id + '/{z}/{x}/{y}.png',
11-
protocol: 'http:'
10+
pathname: options.basepath + 'v2/' + data.id + '/{z}/{x}/{y}.png'
1211
});
1312
});
1413
if (data.formatter || data.template) {
1514
data.grids = data.grids || _(options.tileHost).map(function(host) {
1615
return url.format({
1716
host: host,
18-
pathname: options.basepath + 'v2/' + data.id + '/{z}/{x}/{y}.grid.json',
19-
protocol: 'http:'
17+
pathname: options.basepath + 'v2/' + data.id + '/{z}/{x}/{y}.grid.json'
2018
});
2119
});
2220
}
2321
if (data.basename) data.download = url.format({
2422
host: options.tileHost[0],
25-
pathname: options.basepath + 'v2/' + data.basename,
26-
protocol: 'http:'
23+
pathname: options.basepath + 'v2/' + data.basename
2724
});
2825
return data;
2926
};

0 commit comments

Comments
 (0)