localhost redirecting to https after Mojave upgrade
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