You can trick "serverHost" to return specific values by temporarily setting the config value "overwritehost" to something, "overwriteprotocol". That might do ?