AnsweredAssumed Answered

Absolute url is localhost if ws called through share proxy

Question asked by alarocca on Apr 6, 2011
Latest reply on Apr 6, 2011 by mikeh
Hello, I created a simple webscript that find a node based on the nodeRef provided as argument and display its download url.

var node = search.findNode(args.nodeRef);
model.downloadUrl = url.context + node.url;

In order to get the absolute url, I used within the template the following code:

Now if I call my webscript using the alfresco context (http://myserver:8080/alfresco/service/myws?nodeRef=…) the download url is correct (http://myserver:8080/alfresco/d/d/…).
While if the websscript is called using the share proxy (http://myserver:8080/share/proxy/alfresco/myws?nodeRef=…)
the download url is uncorrect (http://localhost:8080/alfresco/d/d/…).

I would like to use the share proxy based url since the webscript is a share custom document library action.