Use the following syntax
This will return the host including the http or https as well as the port if any is set
var host = context.getUrl().getHost()+":"+context.getUrl().getPort();
it's very wield, have you tried it?
it's returning m.corp.com:-1
I think the problem goes to the reverse proxy port could not be access by xpage code.
but csjs code "location.href" can do that.
and is there any way to pass the csjs code to ssjs code?