couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From CGS <cgsmcml...@gmail.com>
Subject Re: CouchDB cookie from outside CouchDB
Date Fri, 30 Sep 2011 08:06:30 GMT
I used YAWS version 1.91 with reverse proxy and $.ajax() and now I have 
no problem to log in CouchDB from YAWS (and to remain in YAWS until 
different request is registered). Thank you both, Dale and Benoit, for 
your help.

Cheers,
CGS




On 09/29/2011 10:11 PM, Dale Harvey wrote:
> how are you binding to port 80? if you have nginx / apache then you can have
> a reverse proxy, couch also has an in build reverse proxy built in, I would
> suggest going down that route before dealing with cross domain issues, there
> are a lot of them
>
> On 29 September 2011 17:45, Benoit Chesneau<bchesneau@gmail.com>  wrote:
>
>> On Thu, Sep 29, 2011 at 6:42 PM, CGS<cgsmcmlxxv@gmail.com>  wrote:
>>> First of all, thank you Dale for your answer. Still, the problem is more
>>> complex than I anticipated.
>>>
>>> I am using YAWS as web server and it doesn't support proxy, so, I have to
>>> use two different ports for the two (CouchDB and YAWS). Methods I have
>>> tried:
>>> 1. $.ajax() - error: not allowed cross-domain data transfer via
>> JavaScript
>>> (both IP and port should match exactly for both origin and target), so,
>> even
>>> if correct authentication, no cookie.
>>> 2. form action pointing to
>>> server_name:5984/_session?next=/path_to_attachment/back.html - error: if
>> the
>>> authentication fails (incorrect username/password), the "next" is no
>> longer
>>> taken (back.html contains only window.location which redirects back to
>>> YAWS), but it goes back if the authentication doesn't fail.
>>>
>>> I would appreciate any idea related to how to solve any of these errors.
>>> Thank you.
>>>
>>> Cheers,
>>> CGS
>>>
>>>
>> can't you use the reverse proxy module of yaws ? Othere way would be
>> having an iframe. Waiting CORS (patch should be available on friday,
>> was busy).
>>
>> - benoit
>>


Mime
View raw message