Ari
Ari

Reputation: 4191

Using proxy to over come cross domain restriction

After reading James Ward's post I'm considering using a proxy rather than a crossdomain.xml file. I have a java app, which includes a flex applet, on one tomcat instance and a java web service on another tomcat instance. Does it make sense to have a single (Apache httpd) proxy handle requests for both the app and the web service, thus eliminating the cross domain restriction?

Other suggestions/recommendations on how to deal with the cross domain issue are welcome.

Upvotes: 1

Views: 1220

Answers (2)

James Ward
James Ward

Reputation: 29433

Many people serve their Flex app from the same domain as their services to avoid the need for crossdomain policies and proxies. For my sites I have Apache httpd in front of Tomcat (via mod_proxy but mod_ajp would be fine too). The SWF file is served from Tomcat while the services are served from Tomcat through mod_proxy.

Upvotes: 0

Sean Kinsey
Sean Kinsey

Reputation: 38046

A proxy used to unify the two services is probably the cleanest way to do it, but I highly recommend nginx for the proxy as it's really lightweight, fast, and easy to set up.

Upvotes: 1

Related Questions