From 5fc2c9602bf98ec8338ae8f0b441f8e8106de80d Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 14 Feb 2017 19:19:57 +0000 Subject: [PATCH] Use protocol relative URLs for imagery tiles --- cookbooks/imagery/resources/layer.rb | 2 +- cookbooks/imagery/templates/default/imagery.js.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cookbooks/imagery/resources/layer.rb b/cookbooks/imagery/resources/layer.rb index aee757e6e..b1e7cc9d1 100644 --- a/cookbooks/imagery/resources/layer.rb +++ b/cookbooks/imagery/resources/layer.rb @@ -47,7 +47,7 @@ action :create do mode 0o644 content YAML.dump(:name => layer, :title => title || layer, - :url => "http://{s}.#{site}/layer/#{layer}/{z}/{x}/{y}.png", + :url => "//{s}.#{site}/layer/#{layer}/{z}/{x}/{y}.png", :attribution => copyright, :default => default_layer, :maxZoom => max_zoom, diff --git a/cookbooks/imagery/templates/default/imagery.js.erb b/cookbooks/imagery/templates/default/imagery.js.erb index f992ef08d..698c8926f 100644 --- a/cookbooks/imagery/templates/default/imagery.js.erb +++ b/cookbooks/imagery/templates/default/imagery.js.erb @@ -6,7 +6,7 @@ function createMap(divName) { var layers = L.control.layers(null, null, {collapsed:false}); // Add OpenStreetMap layer - layers.addBaseLayer(L.tileLayer("http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", { + layers.addBaseLayer(L.tileLayer("//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", { attribution: "© OpenStreetMap and contributors, under an open license", maxZoom: 19 }), "OpenStreetMap"); -- 2.39.5