Skip to content

Cdn via https - #2

Open
pjwickman wants to merge 2 commits into
bmcbride:masterfrom
respec:cdn_via_https
Open

Cdn via https#2
pjwickman wants to merge 2 commits into
bmcbride:masterfrom
respec:cdn_via_https

Conversation

@pjwickman

Copy link
Copy Markdown

Starting with Chrome 50 (released 04/20/2016) Chrome no longer supports obtaining the user’s location using the HTML5 Geolocation API from pages delivered by non-secure connections. This means that the page that’s making the Geolocation API call must be served from a secure context such as HTTPS.

https://developers.google.com/web/updates/2016/04/geolocation-on-secure-contexts-only

Can't just switch to HTTPS for the building reporter app because the Leaflet CDN does not (currently) support HTTPS access

Switching to cdnjs fixed the problem. Side effect is that the MQ OSM tiles are still loaded via http, leading to some Mixed Content messages. Not sure if those are available via HTTPs, haven't tried looking.

A more elegant solution would be to detect if the app was loaded via HTTP or HTTPS and load Leaflet from the appropriate CDN

@bmcbride

Copy link
Copy Markdown
Owner

Hey Paul,

I don't think this commit pertains to this PR: 659f821. If you want to remove it, I'll merge in your changes. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants