[Dancer-users] Deploying two dancer apps in same virtual host on apache

Mr. Puneet Kishor punk.kish at gmail.com
Sun Sep 4 22:14:07 CEST 2011


On Sep 4, 2011, at 11:50 AM, Alex Tang wrote:

> I've successfully deployed two apps using two different virtual hosts,
> however in this case, the frontend app sends pages back to the browser that
> contain AJAX requests that want to talk directly to the backend app.  I
> can't do this via two different virtual hosts due to same-origin-policy, so
> i need to deploy both apps under the same virtual host


Consider using JSONP. That way you can have two separate virtual hosts communicating with Ajax, no problem. This will also give you the flexibility to move one or the other app to a different web server if and when the need arises. JSONP was invented for this very reason, to get around the same origin policy.


More information about the Dancer-users mailing list