Exception, if IPv6 client connect server with defined ACL 'hosts' rules

i use the ACL rule ‘hosts’, e.g.

- name: 'LOCAL_allow'
  type: 'allow'
  hosts: ['localhost', '']
  verbosity: 'error'

if i connect with an IPv6 origin_address, i receveived this exception

    "type" : "class_cast_exception",
    "reason" : "java.net.Inet6Address cannot be cast to java.net.Inet4Address"

version is readonlyrest-1.16.31_es6.5.3
w/o ‘hosts’ it works fine

it works up to the first comaparsion of origin with ‘host’ is required OR always, if an IPv6 origin compared with hosts

curl -4 works with rule LOCAL_allow above
curl -6 $HOSTNAME:9200 doesnt work

Hey @HagK, thanks for reporting this.
Sounds like a low hanging fruit for a pull request! Would you like to become a open source contributor? I can help you if you need a hand setting up the development environment.