I don’t see an iparam named “domain” that you are setting in the postConfigs() function, based on the return value of that function. But the request template used “iparam.domain” in the template substitution for “host”. So, as iparam.domain is empty, the value of “host” becomes an empty string at runtime. To fix this, you will have to set an iparam with the same name: “domain”. Or, update the request template’s “host” to include the correct iparam based on what you set from postConfigs().
You cannot dynamically set the value for “host” at runtime. So using “context” is not allowed in “host”.