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 97B6D9571 for ; Thu, 29 Sep 2011 20:48:55 +0000 (UTC) Received: (qmail 34130 invoked by uid 500); 29 Sep 2011 20:48:54 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 34091 invoked by uid 500); 29 Sep 2011 20:48:54 -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 34081 invoked by uid 99); 29 Sep 2011 20:48:53 -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:48:53 +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:48:46 +0000 Received: by fxe23 with SMTP id 23so3207808fxe.11 for ; Thu, 29 Sep 2011 13:48:24 -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=ynGcaeKJVlWI+tC0fXFzC7UyzDfclKiXL1X0XVdMbv0=; b=I1yoqQbHRFkr2IMhM1h8TSL2PzzHwU370w9lvspSQERnTHP5Mn2KrKEh9hdYCK5FJn n2aJmUYA5OMx8BJ/2eJKW47fXOOo4vsJCMquENZkf2KPr58JdwREQwnFzMJBXIDxUJ7P MvdwMXJ+OidPCkODFNb9jOx7nV32ec7zi72TQ= Received: by 10.223.28.72 with SMTP id l8mr6392723fac.137.1317329304419; Thu, 29 Sep 2011 13:48:24 -0700 (PDT) Received: from [192.168.1.100] (078088254132.wroclaw.vectranet.pl. [78.88.254.132]) by mx.google.com with ESMTPS id o22sm3633312fab.11.2011.09.29.13.48.22 (version=SSLv3 cipher=OTHER); Thu, 29 Sep 2011 13:48:23 -0700 (PDT) Message-ID: <4E84D996.3080802@gmail.com> Date: Thu, 29 Sep 2011 22:48:22 +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, Dale. I will follow this suggestion (also Benoit suggested the same). I admit I didn't think of that before and both inputs are most appreciated. Port 80 is handled by YAWS (required by the other applications because it's Erlang). In this moment I just need to update my YAWS version (I hope). Thanks again to both of you for your support. 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 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 >>