From user-return-18119-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Thu Sep 29 20:10:59 2011 Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 35EE692EC for ; Thu, 29 Sep 2011 20:10:59 +0000 (UTC) Received: (qmail 11984 invoked by uid 500); 29 Sep 2011 20:10:57 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 11833 invoked by uid 500); 29 Sep 2011 20:10:56 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 11825 invoked by uid 99); 29 Sep 2011 20:10:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Sep 2011 20:10:56 +0000 X-ASF-Spam-Status: No, hits=0.4 required=5.0 tests=FREEMAIL_FROM,FROM_LOCAL_NOVOWEL,HK_RANDOM_ENVFROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of cgsmcmlxxv@gmail.com designates 209.85.161.52 as permitted sender) Received: from [209.85.161.52] (HELO mail-fx0-f52.google.com) (209.85.161.52) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Sep 2011 20:10:48 +0000 Received: by fxe23 with SMTP id 23so3157573fxe.11 for ; Thu, 29 Sep 2011 13:10:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=aBzX1zO50/pGQx66HnyAFI5309AzY2Hi0S7YTi8TIT0=; b=iRQTzlSYGPgOE5u+c0gYUHAN/JitimTIykUGVG/ogX+K6RdM2tbf1u1eWxmvj1qs90 oejYq6vbz4zhbU+eRo0ZYTmbCGWvouZ8ooJo6lCZweJVtewhgh7vv84rHx+tzN7D+qUd m4Ow2C2Tvv3giHR4aLLkQcP2FWn4mtw5DydFE= Received: by 10.223.52.141 with SMTP id i13mr12256035fag.74.1317327027613; Thu, 29 Sep 2011 13:10:27 -0700 (PDT) Received: from [192.168.1.100] (078088254132.wroclaw.vectranet.pl. [78.88.254.132]) by mx.google.com with ESMTPS id b10sm3524152fam.1.2011.09.29.13.10.26 (version=SSLv3 cipher=OTHER); Thu, 29 Sep 2011 13:10:26 -0700 (PDT) Message-ID: <4E84D0B2.1060200@gmail.com> Date: Thu, 29 Sep 2011 22:10:26 +0200 From: CGS User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.21) Gecko/20110831 Thunderbird/3.1.13 MIME-Version: 1.0 To: user@couchdb.apache.org Subject: Re: CouchDB cookie from outside CouchDB References: <4E8189D3.7080905@gmail.com> <4E84A003.4030300@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Thanks, Benoit. It might work this option, only that YAWS v.1.88 (default for Ubuntu) is not able to handle revproxy (I get a nice 404). I think I need to install YAWS from github. Cheers, CGS On 09/29/2011 06:45 PM, Benoit Chesneau wrote: > On Thu, Sep 29, 2011 at 6:42 PM, CGS 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