neo4j-graphql / neo4j-graphql

GraphQL bindings for Neo4j, generates and runs Cypher
https://grandstack.io/docs/neo4j-graphql-plugin.html
Apache License 2.0
450 stars 71 forks source link

Request blocked by CORS policy #172

Open francois-le-boulaire opened 5 years ago

francois-le-boulaire commented 5 years ago

Hello,

we have a react web application and a neo4j database community edition with neo4j-graphql-3.4.0.1.jar plugin (same version as neo4j)

Here are the errors when we try to connect from our react application to the neo4j database

OPTIONS http://cds-db.capx.biz:7474/graphql/ 404 (Not Found)

Access to XMLHttpRequest at 'http://cds-db.capx.biz:7474/graphql/' from origin 'http://cds.capx.biz' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status.

Can someone help us resolve our issue?

Thanks a lot

jexp commented 5 years ago

Really odd, because we actually have an explicit OPTIONS method.

https://github.com/neo4j-graphql/neo4j-graphql/blob/3.4/src/main/kotlin/org/neo4j/graphql/GraphQLResource.kt#L32

francois-le-boulaire commented 5 years ago

OK, in the version we use?

francois-le-boulaire commented 5 years ago

Hi, Since which version is the OPTIONS method supported? Thank you

jexp commented 5 years ago

For quite a long time. Can you try the latest version.

francois-le-boulaire commented 5 years ago

Ok. Will it work with our version of neo4j? 3.4

François Le Boulaire IDrogen 5145184407

Le mar. 26 mars 2019 13 h 47, Michael Hunger notifications@github.com a écrit :

For quite a long time. Can you try the latest version.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/neo4j-graphql/neo4j-graphql/issues/172#issuecomment-476769470, or mute the thread https://github.com/notifications/unsubscribe-auth/AHckZYp1WRiQghIwLiHRo-6g2gFu5Zv4ks5val05gaJpZM4b7LXK .