How and where to add crossdomain.xml in neo4j so that its available on localhost:7474/crossdomain.xml?

149 Views Asked by At

I am sending a Basic Auth Post request to neo4j REST

x.x.x.85:7474/db/data/transaction/commit

I am using unity www at x.x.x.15 which requires crossdomain.xml to be present at x.x.x.85:7474/crossdomain.xml. Where and how should I get crossdomain.xml at the desired location?

1

There are 1 best solutions below

1
Frank Pavageau On

You can't add arbitrary resources to be served by Neo4j.

You could put it behind a HTTP server with reverse proxy capabilities (Apache HTTP Server, nginx) to serve the file and proxy the rest of the requests to Neo4j.

However, the real question is whether you should be exposing your database directly, to be used by a client browser (which is the reason why you need a crossdomain file) which could send any query, including MATCH(n) DETACH DELETE n, a.k.a. the new DROP TABLE (or DROP DATABASE).