netbymatt / ws4kp

WeatherStar 4000+
https://weatherstar.netbymatt.com
MIT License
236 stars 39 forks source link

Docker container and Safari issues #28

Closed OMGMYSPLEEN80 closed 10 months ago

OMGMYSPLEEN80 commented 1 year ago

Safari, MacOS 13.4.1 Any location.

I'm running WS4000 in Docker (via Portainer). While going to your live version of WS4000 I can load the forecast for my or any other location fine. When I open mine locally in Safari, the gps location button does nothing. If I search for a location, I will get the suggestions and if I pick one, it will select but hitting "Go" does nothing. "Reset" also does nothing.

If I try it on MS Edge for MacOS, it works fine. If I try it from Edge in Linux (Ubuntu specifically), it works. It's just my local Docker container version and only in Safari. It's weird. Any thoughts?

netbymatt commented 1 year ago

Geolocation (the GPS button) is intended to be used only across secure connections. All the browsers make exceptions for this for development purposes. But how each one is implemented is slightly different. I know Chrome considers localhost as a secure source for this purpose. I've never really dug into how exactly the other browsers handle the local exception.

If I had to guess, maybe you're going to http://<your local ip>/ instead of http://localhost/ when you're accessing your docker container and Safari doesn't consider that method local/secure.

OMGMYSPLEEN80 commented 1 year ago

Geolocation (the GPS button) is intended to be used only across secure connections. All the browsers make exceptions for this for development purposes. But how each one is implemented is slightly different. I know Chrome considers localhost as a secure source for this purpose. I've never really dug into how exactly the other browsers handle the local exception.

If I had to guess, maybe you're going to http://<your local ip>/ instead of http://localhost/ when you're accessing your docker container and Safari doesn't consider that method local/secure.

I've tried both the ip and localhost but no difference. Just weird that it's only the one on my local machine but other pages that have the WS4K set up work just fine in Safari. I'll play around with it more on my end, probably something goofy in my setup. Thank you for the response!