0 Replies Latest reply on Sep 2, 2015 7:47 AM by ahsijetaisriche

    get url of requesting Flex app from a remote object

    ahsijetaisriche Level 1

      I would like to know if it is possible to get the URL (or the domain) of the Flex application which calls a remote object, from that remote object.

       

      I have a Flex application which is accessed by different domains, and for each domain, the remote object must use a database whose name is the root of the domain name of the URL, such as 'sample1' if the remote object is called from the Flex application through URL 'sample1.mydomain.com/myapp', and 'sample2' if the remote object is called from the same Flex application through URL 'sample2.mydomain.com/myapp'

       

      I know I could use an argument that the Flex app could pass to the remote object, but this is legacy code and this implies a huge amount of changes.

       

      If I could do it in the remote object which does the connection to the database, I would only have to change the getconnection call in that remote object.

       

      Please advise.