Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
OSM Mapnik is hard-coded to be accessed via http, but some sites may need maps to render under https. The service supports https/ssl requests via the exact same url, so there's no reason to hard-code the protocol.
Proposed resolution
Use headless urls ("//" instead of "http://") for map access.
Remaining tasks
Test and commit patch.
User interface changes
None.
API changes
None.
Comment | File | Size | Author |
---|---|---|---|
#3 | leaflet-https_7x_11-2341015-3.patch | 1.13 KB | JrgenGNielsen |
#1 | leaflet-https-2341015-1.patch | 1.41 KB | froboy |
Comments
Comment #1
froboyComment #2
gollyg CreditAttribution: gollyg commentedPatch in #1 works as expected for me.
Comment #3
JrgenGNielsen CreditAttribution: JrgenGNielsen commentedPatch in #1 works nicely on 7.x-1.x
On 7.x-1.1, not so much... you may want this instead.
Comment #4
mikhailian CreditAttribution: mikhailian commentedThe patch by @JrgenGNielsen is simple and straight to the point.
Here's some more info about protocol-relative urls. They are accepted everywhere where leafletjs works.
Comment #5
mikhailian CreditAttribution: mikhailian commentedComment #6
froboyThanks all. This seems pretty straightforward and not have any opposition. Hopefully we can get a commit?
Comment #7
bazzmann CreditAttribution: bazzmann at Bazzmann Agency commentedYes please, commit it. :)
Comment #9
RdeBoerCommitted.
Thanks froboy and JrgenGNielsen.
Available now in 7.x-1.x-dev and in 7.x-1.2 when released.
Rik
Comment #10
RdeBoerComment #11
bazzmann CreditAttribution: bazzmann at Bazzmann Agency commentedThanks :)
Comment #13
netgeek123 CreditAttribution: netgeek123 commentedGoogle maps seems to be the only ones serving files through https.
Comment #14
astringer CreditAttribution: astringer commentedRemoving my comment, it needs to go to leaflet mapbox.