0

I'm trying to use Focus, an app that redirects blocked websites through localhost. However, while this works properly with Chrome and Firefox, Safari gives me an error message as in the attached image.

If in the web address I replace localhost with 127.0.0.1 everything works fine. How can I fix this?

The content of my /private/etc/hosts file is the default one, i.e.

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1   localhost
255.255.255.255 broadcasthost
::1             localhost 
fe80::1%lo0 localhost

enter image description here

EDIT: Here is a screenshot of my proxies.

enter image description here

1 Answer 1

1

Edit: this didn't help, ignore it.

This might be related to HSTS. Different browsers deal with it in different ways. Do you have any non-Apache local web server installed? I'm assuming there's something to do with Focus that's running on port 8919 from your screenshot.

Try this: Quit Safari, make a backup of ~/Library/Cookies/HSTS.plist somewhere safe, delete ~/Library/Cookies/HSTS.plist, start Safari, and try that URL again. Does that help?

9
  • Thank you for your help. I followed your instructions and unfortunately nothing changed. You are right that Focus is running something on port 8919, and as I said I can open that correctly with other browsers. Also, how would I check if I have any local web servers installed?
    – gabo_18
    Commented Mar 24, 2019 at 0:22
  • Try commenting out the IPv6 lines in hosts: #::1 and #fe80::1%lo0 -- any luck? Commented Mar 24, 2019 at 15:05
  • Still no luck unfortunately.
    – gabo_18
    Commented Mar 24, 2019 at 21:59
  • I'll take a closer look since curiosity is getting the better of me -- there are numerous apps for macOS called Focus, can you reply with a link to the one you're using and I'll have a poke around. Thank you. Commented Mar 25, 2019 at 10:57
  • Thanks again! Here it is, however I don't think the issue is with this app in particular.
    – gabo_18
    Commented Mar 25, 2019 at 13:32

You must log in to answer this question.

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