Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Safari Localhost Permission Blocked

So ran into this issue today, where I have a website that needs the geolocation of the user. It was working fine when running locally on localhost, but now I get an error saying "Access to geolocation was blocked over insecure connection to http://localhost:4200". WTF Apple? I also tried 127.0.0.1 but got the same result. Am I missing something in the dev settings or did Apple just break everything?

Safari Version: 9.1.3 (11601.7.8)

like image 375
trev9065 Avatar asked Sep 30 '16 18:09

trev9065


1 Answers

Maybe it's possible to use https ( How to get angular-cli to ng serve over HTTPS ) and if not is possible directly for some reason maybe you can use a transparent proxy that offers https.

Many HTML5 new features like access to webcam, geolocation and others are now allowed only on pages served thru https scheme, so probably using https will work again. If not, maybe is possible to modify hosts file to workaround the problem.

like image 164
user1039663 Avatar answered Oct 06 '22 12:10

user1039663