Could we specify something like this: 
````
urlRoot: location.protocol+'//'+location.hostname+(location.port ? ':'+location.port: ''),
````
@cppwfs  was having some issues when deploying to EC.