ffwdme / ffwdme.js

[DEPRECATED!] 🛑 A JavaScript toolkit that aims to bring interactive GPS driving directions to the mobile browser
http://ffwdmejs.org
MIT License
153 stars 36 forks source link

Not allowed to run insecure content from graphhopper! #27

Closed maeishoj closed 8 years ago

maeishoj commented 8 years ago

Hey there,

When I run this from safari, I get the following error:

[blocked] The page at https://*******_.**_**.com was not allowed to run insecure content from http://graphhopper.com/api/1/route?type=jsonp&key=80d26239-aa0b-4648-a1b4-ef3adaa6e2b5&locale=en_EN&vehicle=car&weighting=fastest&point=37.32161030920668%2C-122.00565355656319&point=37.322858%2C-122.014845&callback=ffwdme.utils.Proxy.callbacks.cb1.

Why is that?

maeishoj commented 8 years ago

PS: For everyone else using https, just change the API call to https://graphhopper.com/api/1/....... Perhaps that should even be the default.. :)

fabrik42 commented 8 years ago

Hey, good job finding this!

The reason for this is a general security policy of the browser that prohibits insecure content (non https) to possibly compromise the secure https content.

If you want to, you can create a Pull Request and I would be happy to merge it.

We could even try to make it more stable by using the protcol of the current site via location.protocol.

What do you think?

maeishoj commented 8 years ago

Hey Christian,

That sounds like a good idea! There are a few more things I could perhaps find the more I use this. However I'm in the middle of a huge delivery atm, so I hope it's ok if it can wait :)

Anyway thanks again for a great library!

PS: Yesterday i was running it on an iPad, and I noticed that as I moved the map slightly turned (like a 30 degree angle) but it looked "cut" as if the map itself turned but the angle created a "triangle" which remained gray. I will replicate it and take a screenshot with the iPad and post it as a new issue. I wonder if you noticed that before..

nunovelosa commented 8 years ago

@maeishoj did you change the zoom ?

maeishoj commented 8 years ago

@nunovelosa no i did not