JBoss | HTTP/1.1 400 No Host matches server name localhost

I’m running an app inside a docker container and the host in server.xml of the JBoss-4.2 server is “localhost”.
This command

curl -v localhost:8090/ 

establishes a connection but return “HTTP/1.1 400 No Host matches server name localhost”

cat /etc/hosts 

gives localhost
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters 5f6b9e76d025 endpoint.used.bytheapp

Any suggestions ?

Source: StackOverflow