Safari only wants to connect to localhost via HTTPS
Do a lot of local development and recently I've noticed that I cannot connect to non-HTTPS services running on localhost. If the services provide HTTPS then I am able to connect, but every time I try something like "http://devsite:8000", Safari always tries to access "https://devsite.local:8000".
Using Chrome, I can properly access the site.
Perhaps the issue is HSTS?
I am running Safari 10.1 on macOS Sierra.
Solution 1:
Actually, it looks like it was HSTS.
I followed the directions posted here:
- Close Safari.
- Delete the ~/Library/Cookies/HSTS.plist file.
- Reopen Safari.
And now localhost sites are working correctly.