The default configuration states localhost and example.com as aliases. To change this you have to simply change or remove the specific parts of your virtual-server config in your standalone.xml:
<virtual-server name="default-host" enable-welcome-root="false"> <alias name="localhost"/> </virtual-server>
This would only be a single alias with value localhost (and disabled welcome root).
Or to change it with cli:
/subsystem=web/virtual-server=default-host:write-attribute(name=alias,value=["localhost"])