incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johannes Jörg Schmidt <schm...@netzmerk.com>
Subject Re: Vhost session authorization and rewrites
Date Fri, 28 Jun 2013 08:27:32 GMT
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 <wordituk@gmail.com>:
> On 27 Jun 2013 18:13, "Johannes Jörg Schmidt" <schmidt@netzmerk.com> 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

Mime
View raw message