On 29 Sep 2009, at 11:10, Marcin Lepicki wrote:
Hi,
I am developing Flex application with CouchDB backend (only GET
requests, for images). Flash/flex apps must pass security rules for
flash player (more info on
http://www.adobe.com/devnet/flashplayer/articles/fplayer9_security.html
),
but all I want to get special text file crossdomain.xml at
/crossdomain.xml, for example http://localhost:5984/crossdomain.xml.
Now we are using apache proxy with rewrite rule to achieve it.
I have looked at http://wiki.apache.org/couchdb/ExternalProcesses, but
only [httpd_db_handlers] are described there. In this case I want to
use external process for [httpd_global_handlers], but I can't get it
work.
I am using Python script described at
http://wiki.apache.org/couchdb/ExternalProcesses.In local.ini
configuration file I have added:
[external]
cross = python /path/bin/test.py
[httpd_global_handlers]
crossdomain.xml = {couch_httpd_external, handle_external_req,
<<"cross">>}
When pointing to http://localhost:5984/crossdomain.xml I get:
{"error":"external_server_error","reason":"Broken assumption"}
When changing [httpd_global_handlers] to [httpd_db_handlers] it works
perfectly, but only for databases, like
http://localhost:5984/mydb/crossdomain.xml.
Is there any chance to get per-node external handler?
You could try to use the file handler we use for Futon (/_utils) to
serve
the global /crossdomain.xml from Erlang, without the need for
maintaining an external.
Cheers
Jan
--