We have a conditional statement for months now that was always working properly. But now we discovered that its not working anymore because the expression $Server.Hostname$ returns "localhost" now instead of the real hostname "nemesis" (in our case).
Apologies for the confusion but there are two related server variables which can be used in expressions.
$Server.Url$ gets its value from a server property named ‘server.hosturl’ which can be set under Administration > Continua Server > Properties. This gets set by default to the
url value in externalurl node app.config. If this is missing it defaults to the base url of the first browser request to the web server e.g. “http://localhost”. We will however now deprecate the externalurl node as this value is always overriden by the server property anyway. We have just noticed that the $Server.Url$ variable is not picked up by the intellisense, so you probably don’t even know this exists. We will fix this for the next build.
$Server.Hostname$ currently gets its value either from serverHostName attribute of the configuration\continua-configuration\endpoints node in the agent config file when accessed from the agent or from Environment.MachineName when accessed on the server. We will add a server property for this in the next build to allow the default value to be overridden.
Meanwhile please ensure that the serverHostName attribute in the agent config file has the correct hostname if you want to use $Server.Hostname$.