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 7C37BC9D1 for ; Thu, 27 Jun 2013 15:38:00 +0000 (UTC) Received: (qmail 62673 invoked by uid 500); 27 Jun 2013 15:37:59 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 62388 invoked by uid 500); 27 Jun 2013 15:37: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 62380 invoked by uid 99); 27 Jun 2013 15:37:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Jun 2013 15:37:56 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of travis.e.paul@gmail.com designates 209.85.212.54 as permitted sender) Received: from [209.85.212.54] (HELO mail-vb0-f54.google.com) (209.85.212.54) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Jun 2013 15:37:50 +0000 Received: by mail-vb0-f54.google.com with SMTP id q12so782496vbe.27 for ; Thu, 27 Jun 2013 08:37:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=pkYVfZfGudkS4/IDVlYOXk+9K9NZRM2Vyov4d/2GBHY=; b=PILN9oHMqiVffjfTvuv2iSabglCRy04KucUMRxLaA19VtixBQu3volUY3niuUyPWKH vzk+pTI82wEOZG8mRn2ZW7liDnJ+HzCY/RFnWxU55jv+RCFhEap120vv8BcS4c13UczS VBWkCWsWN/UUPZsMxW4yzBoAWMfxwtPhSnanBDMHFKZuzd4MUnCQI26JEnzIu48VTM4u Jsu2osFBLIA8HCvKbqdilh2CBhzeM+s67cXssXcXYcs9X7ll7bMh7bQXgHdfsxBtZcLh CAboQKbpXyFzrZrWELb4KtTV2bBl7CCFjABzJTayNiqKgBlei1g3CJFaIMF2P0+RDC7u hncA== MIME-Version: 1.0 X-Received: by 10.58.181.225 with SMTP id dz1mr3698508vec.95.1372347449696; Thu, 27 Jun 2013 08:37:29 -0700 (PDT) Sender: travis.e.paul@gmail.com Received: by 10.58.75.100 with HTTP; Thu, 27 Jun 2013 08:37:29 -0700 (PDT) In-Reply-To: References: Date: Thu, 27 Jun 2013 11:37:29 -0400 X-Google-Sender-Auth: QfWIBj4jQFYUdUN0KV9ThO4lKf0 Message-ID: Subject: Re: Vhost session authorization and rewrites From: Travis Paul To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=047d7b6050203f69ad04e0248a65 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b6050203f69ad04e0248a65 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Ah yes you're right Johnnes, I took that rewrite out and could hit _session. Looks like I am using that rewrite for a different reason, seems like my couchapp won't directly access items in _attachments without it, e.g. "/js/foo.js" in "_attachments/js/foo.js" On Thu, Jun 27, 2013 at 11:23 AM, Johannes J=F6rg Schmidt < schmidt@netzmerk.com> wrote: > Handlers defined in `[httpd] vhost_global_handlers` are already > routed. By default: _utils, _uuids, _session, _oauth, _users. > > g jo > > 2013/6/27 Travis Paul : > > At the end of my rewrites I have: > > > > { > > "from": "*", > > "to": "*" > > } > > > > So that I can just use _session and other handlers as needed. > > > > > > > > On Thu, Jun 27, 2013 at 10:51 AM, Wordit wrote: > > > >> Does anyone know what rewrite rules are needed with a vhost so that > session > >> authorization works? > >> > >> I have the following rules but get a 401 error, despite the user being > >> correctly authenticated. > >> > >> {from: "/_session", to: "../../../_session"}, > >> {from:"/", to:'index.html'}, > >> {from:"/*", to:'*'} > >> > >> The vhost mydomain.com points to realhost.com/db/_design/db. Hence the > >> _session rewrite above, but that does not solve the problem. I still > get a > >> 401 error or http login modal. > >> > >> The error occurs when making a JSONP request via jQuery to > >> realhost.com/db/doc. I need to retrieve an entire document. > >> > >> Can a rewrite rule solve this, or possibly a different access method? > >> > >> Many Thanks, > >> > >> Marcus > >> > --047d7b6050203f69ad04e0248a65--