Not sure if I understand your setup, but you could have a rewrite rule
{
"from": "api/*",
"to": "../../*"
}
This way you have access to the whole database api.
Also, have a look at CORS: http://wiki.apache.org/couchdb/CORS
Johannes
2013/6/27 Wordit :
> On 27 Jun 2013 18:13, "Johannes Jörg Schmidt" wrote:
>>
>> Maybe its a host issue, sessions are bound to the hostname - are you
>> posting the authentication request to the same host as the jsonp
>> request?
>> How does your vhost entry looks like?
>
> My vhost domain points inside the _design doc holding my couchapp:
>
> realhost.com/db/_design/db
>
> It works fine including authorization. The problem is when I need to access
> a document directly.
>
> If the user authenticates to the vhost domain, then the real host domain
> has no session cookie. So I would need to access the database via the vhost.
>
> But how do you access realhost.com/db/doc via vhost.com/db/doc? Is there a
> rewrite to achieve this, or a totally different approach?
>
> Marcus