I am building an application (deployed on Wildfly) that needs to create virtual-hosts based on how customers signup for the service. For e.g. the default application/service runs on a host called main.exampledomain.com. When customer A signs up for the service, then I need to create a virtual host A.exampledomain.com and A.exampledomain.com needs to serve exactly the same WAR/Web Content as main.exampledomain.com.
I can do this with the "host" configuration in standalone.xml --> subsystem undertow, with additional virtual-host configuration in jboss-web.xml (for all the WARs that are to be deployed).
Is there a programmatic/dynamic way to do this? Is this possible and should I do this with undertow APIs? OR Is this possible and should I use Wildfly Management APIs?
I searched through some the topics related to this, and only found discussions and answers around configuration, but not a programmatic way to do this.
Thanks and Best Regards, GPN