Google chrome and localhost in swarm mode

I’m having the exact same issue, apparently chrome is using the ipv6 localhost.

To reproduce in curl try
curl -v ip6-localhost:$SERVICE_PORT
or if ip6-localhost is not set in your hosts file
curl -v ::1:$SERVICE_PORT

If anyone knows how to get chrome to not bypass the hosts file please let me know. For now the workaround has to be use 127.0.0.1 which is very annoying.