Fixed OpenSearch templates so they do not use $ENV{HOSTS} because this can
be incorrect behind load balancers, reverse proxies and the like.