That setup might be an issue.  Easiest way to check is to put a
completely open crossdomain.xml file in the root of the web server.  Now
which server is that???  Try both the real one and the virtual one.  Get
it working and remove them till it breaks.

 

Tracy

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of fishburn_david
Sent: Tuesday, November 25, 2008 9:55 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: When is a crossdomain.xml file required?

 

--- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
, "Tracy Spratt" <[EMAIL PROTECTED]> wrote:
>
> "I am still in the sameDomain", bold words. Post the url to the Flex
> app and to the HTTPService you are calling, and let's see.

I set this variable when the application starts:

provisioningServerHostPort =
HTTPUtil.getProtocol()+"//"+HTTPUtil.getHostName()+(HTTPUtil.getPort()==
''?'':(":"+HTTPUtil.getPort()))+"/mmo";

This uses the ExternalInterface like this:

/**
* Returns the current host name. 
* example: http://www.flexpasta.com/?x=1&y=2
<http://www.flexpasta.com/?x=1&y=2>  would return
www.flexpasta.com
*/ 
public static function getHostName():String
{
return ExternalInterface.call("window.location.hostname.toString");
}

/**
* Returns the current protocol, such as http:, https:, etc
* 
*/
public static function getProtocol():String
{
return ExternalInterface.call("window.location.protocol.toString");
} 

So the HTTPService calls use the above variable:

<mx:HTTPService 
id="ajaxData"
url="{provisioningServerHostPort}/ws_data"
resultFormat="e4x"
useProxy="false"
result="resultHandler(event);"
/>

The URL I launch the application is of this form:
http://fishburn-d830/mmo/MMO.html <http://fishburn-d830/mmo/MMO.html> 

So the provisioningServerHostPort is:
http://fishburn-d830/mmo/ws_data <http://fishburn-d830/mmo/ws_data> 

So it should be hitting the same web server (Apache).
Once inside Apache, I have a reverse proxy defined like this:

<Location /mmo/ws_data>
ProxyPass http://fishburn-d830:8585/mmo/ws_data
<http://fishburn-d830:8585/mmo/ws_data> 
ProxyPassReverse http://fishburn-d830:8585/mmo/ws_data
<http://fishburn-d830:8585/mmo/ws_data> 
</Location>

So, the request is actually processed by a different web server, but
the originating URL is in the same domain.

Is there a problem with this?

Thanks for your response.
Dave

 

Reply via email to