I developed an early prototype of my current project with Flex (Flash),
and ran into this issue early on. At first, I resolved it by actually
modifying my copy of CouchDB and recompiling it, so that it would handle
a request for the crossdomain file in the same way that it handles the
welcome response. That worked fine until I upgraded CouchDB, and
realised I'd forever be patching the thing and it was unlikely to
something that deserved to go into Trunk.
Ultimately, I resolved it in a way that wouldn't break or require
frivolously hacking into the Couch source. I put the entire Flex/Flash
application into my CouchDB database. It had quite a number of modules,
images, etc... so I created a script that uploaded all these files, -
including the home index.html - all as attachments to a single Couch
document called "MyApp" (replace with the real name of your
application). In this way, Flash never bothered to ask for a
crossdomain file, because the domain/port serving the app is the same as
the one serving the data. My application then became accessible using
a URL like this:
http://www.mydomain.com:5984/MyApp/
(because the webbrowser will automatically try "index.html", that's what
you'll get).
Cheers,
Kai
On 18/03/2011 23:03, edward de jong wrote:
I have the same problem; I am trying to access couch from the same machine as
myself, and actionscript (flash) is balking because it can't get the
crossdomain.xml file from root on that socket. I have tried copying
crossdomain.xml all over the place but no go. clearly it has to be inside couch,
but I have no idea how to stuff a crossdomain.xml file into couch; it isn't a
database, but just a text file that couch is being expected to spit up when
requested.... any help would be appreciate, every single person using
actionscript + couch will have the same problem!