CDN library locked in Chrome

I use the / OSM booklet for a small map on the site. The site itself is accessible via HTTPS, while the leaflet library can (afaik) be retrieved only through an HTTP connection. Now Chrome does not include the library and gives me the following message in the console:

[blocked] The page at https://example.com/foo/bar ran insecure content from http://cdn.leafletjs.com/leaflet-0.5/leaflet.css_ 

Any idea how I could get around this?

+6
source share
4 answers

http://cdnjs.com/libraries/leaflet/ has a leaflet. They also have an HTTPS version.

 //cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.3/leaflet.css //cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.3/leaflet.js 

Use the above URLs in your code. The same protocol used to load the current page will also be used to extract assets in the worksheet.

+14
source

Instead of using the hosted version of the flyer, you can provide the necessary javascript and css files yourself: just grab the latest version of the flyer from http://leafletjs.com/download.html and copy the "dist" directory to your project directory. After that, you can change the links from http://cdn.leafletjs.com/leaflet-0.5/ "to" ./ dist / ".

+10
source

Remove "http:" from your help. try "//cdn.leafletjs.com/leaflet-0.5/leaflet.css". It will use the current page protocol to send the request.

+1
source

Tiles are uploaded to the CDN via HTTP, so help with js / css in SSL

0
source

All Articles