Safari Localhost Permission Blocked

前端 未结 2 571
旧时难觅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:17

    I found a sort of solution but it is a bit tedious. I use ngrok to route my server and then the geolocation works fine. The only thing I don't like is that it has limits (if you are using free account), like you can't refresh a lot of times.

    edit:

    To Use ngrok download it first, then on terminal type

    ./ngrok http 
    

    ngrok example. It will then show you the url routes. I used https. Go to to that address.

    More ngrok instructions and download

提交回复
热议问题