Last active
July 20, 2021 19:06
-
-
Save thetwopct/206edcf1c3110fd81a09d1af154e6cbf to your computer and use it in GitHub Desktop.
Fix Safari "Can't establish a secure connection to the server" with self-signed certificates (Lando, Vagrant, Docker etc)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Stop the HTTP storage manager (since it has an in-memory cache of the HSTS hosts). | |
killall nsurlstoraged | |
# Delete the HSTS cache file. | |
rm -f ~/Library/Cookies/HSTS.plist | |
# This may not work if Terminal is not configured for "Full Disk Access", so instead: | |
# Open Finder, Shift+Apple+G, paste in ~/Library/Cookies/ and manually delete HSTS.plist | |
# Start up nsurlstoraged again | |
launchctl start /System/Library/LaunchAgents/com.apple.nsurlstoraged.plist | |
## Otherwise | |
# Open Keychain Access | |
# Go to All Items | |
# Filter by some of the sites URLs | |
# Delete the related secure certificates |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment