1

After the recent upgrade to macOS Mojave Safari started redirecting from http://localhost to https://localhost. The problem persists only in Safari, in Chrome everything is the same as before. Now I'm temporary using 127.0.0.1 as a replacement, but it's inconvenient due to some limitations of software I'm using.

I tried searching and found some similar questions, where accepted answers were to kill Safari and remove ~/Library/Cookies/HSTS.plist file, and in my case it didn't work.

I also tried this answer, without luck.

2
  • is it the SIP on Mojave doing it ?
    – Ruskes
    Oct 23, 2018 at 20:48
  • @Buscar웃, I disabled SIP in order to remove ~/Library/Cookies/HSTS.plist Oct 23, 2018 at 20:50

1 Answer 1

4

Safari did that before Mojave.

Try this to fix it

sudo killall nsurlstoraged
rm -f ~/Library/Cookies/HSTS.plist
launchctl start /System/Library/LaunchAgents/com.apple.nsurlstoraged.plist
1
  • That helped, thanks! Actually, I was wondering if anything could be done with SIP enabled, as it was in the question my is marked as a possible duplicate of, because I wasn't able to remove HSTS file with SIP enabled. Oct 24, 2018 at 7:00

Not the answer you're looking for? Browse other questions tagged .