couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Travis Paul ...@visPaul.me>
Subject Re: Vhost session authorization and rewrites
Date Thu, 27 Jun 2013 15:37:29 GMT
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örg 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 <Tr@vispaul.me>:
> > 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 <wordituk@gmail.com> 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
> >>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message