Safari Localhost Permission Blocked

前端 未结 2 598
旧时难觅i
旧时难觅i 2021-01-03 18:32

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 sa

2条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-03 19:12

    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.

提交回复
热议问题