From 84265b9e1b403303c2fa31090cab31ce14803c26 Mon Sep 17 00:00:00 2001 From: Nicolas Iooss Date: Sat, 14 Dec 2013 20:21:57 +0100 Subject: [PATCH] Force to use HTTPS to retrieve Google Maps elements Chromium was complaining about loading HTTP images in an HTTPS page. Error message was: The page at 'https://www.polytechnique.org/map' was loaded over HTTPS, but displayed insecure content from 'http://chart.apis.google.com/chart?chst=d_map_pin_letter&chld=|00ff00': this content should also be loaded over HTTPS. Signed-off-by: Nicolas Iooss --- Makefile | 7 +++++-- htdocs/javascript/maps.js | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index cb92b45..30bf7ce 100644 --- a/Makefile +++ b/Makefile @@ -251,9 +251,12 @@ $(JSTREE_PATH): ## maps: htdocs/javascript/markerclusterer.js -## Try and use taged version asap (from http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerclusterer/…). +## Try and use taged version asap (from http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerclusterer/...). +## Force to use https to retrieve images htdocs/javascript/markerclusterer.js: - wget "http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/src/markerclusterer_compiled.js?r=308" -O htdocs/javascript/markerclusterer.js + wget 'http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/src/markerclusterer_compiled.js?r=308' -O $@.tmp -q || ($(RM) $@.tmp; false) + sed 's,http\(://google-maps-utility-library-v3.googlecode.com\),https\1,g' < $@.tmp > $@ + $(RM) $@.tmp ## ## Raven-js diff --git a/htdocs/javascript/maps.js b/htdocs/javascript/maps.js index c31d752..edfd2e9 100644 --- a/htdocs/javascript/maps.js +++ b/htdocs/javascript/maps.js @@ -77,7 +77,7 @@ function ColoredIcon(color) { this.set('starcolor', null); this.set('color', color); - this.set('icon', 'http://chart.apis.google.com/chart?chst=d_map_pin_letter&chld=|' + color); + this.set('icon', 'https://chart.googleapis.com/chart?chst=d_map_pin_letter&chld=|' + color); } ColoredIcon.prototype = new google.maps.MVCObject(); -- 2.1.4