robsonvn / laravel-couchdb

A CouchDB based Eloquent model and Query builder for Laravel
56 stars 28 forks source link

Exception: QueryException Referer header required. #8

Closed abedmaatalla closed 7 years ago

abedmaatalla commented 7 years ago

When ever i call get() this error show up. when i took a look into your code i found your comment saying that you need to work more on it.

robsonvn commented 7 years ago

I'll wait for your response on #7 before going on this issue.

abedmaatalla commented 7 years ago

But i can create new documents but i can't retrieve them

robsonvn commented 7 years ago

There is another thing missing in the docs is that the CouchDB user must have admin privileges because only admins can create design docs (index). Are you using an admin user?

abedmaatalla commented 7 years ago

yes, I'm admin user .. i can create docs but it shows this issue when i want to retrieve

QueryException Referer header required.

abedmaatalla commented 7 years ago

can you please share one of your project's composer.js?

robsonvn commented 7 years ago

I have just created a boilerplate app, please check it out.

https://github.com/robsonvn/laravel-couchdb-boilerplate

robsonvn commented 7 years ago

I reckon there is something to do with your composer.json as well, please tell me if the boilerplate app works for you.

abedmaatalla commented 7 years ago

no it didn't work. still this error showing up Exception QueryException Referer header required.

abedmaatalla commented 7 years ago

I can always create new docs but can't retrieve them

robsonvn commented 7 years ago

can you tell me your couchdb version

curl -X GET http://localhost:5984

abedmaatalla commented 7 years ago

"version":"1.6.1","vendor":{"name":"Homebrew","version":"1.6.1_12"}

robsonvn commented 7 years ago

Oh yeah, currently this library only works with CouchDB 2.0+

robsonvn commented 7 years ago

In fact, I don't see this library supporting 1.x version because it relays on Mongo Query (/find endpoint) and it's only available on CouchDB 2

robsonvn commented 7 years ago

I'm closing this issue, I hope you can upgrade your CouchDB version.