You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Boaz Citrin <bc...@gmail.com> on 2014/01/15 14:18:37 UTC
Issue with couch_httpd_proxy
Hello,
I am trying to achieve Url rewrite of this form:
http://couchdb:5984/a/b/* => http://server:1234/c/*
Tried this without success:
a/b = {couch_httpd_proxy, handle_proxy_req, <<"http://server:1234/c">>}
Getting:
{"error":"not_found","reason":"no_db_file"}
I wonder if I need to escape the "/" somehow. Tried a%2Fb but got the same
result.
Any idea?
Thanks!
Boaz
Re: Issue with couch_httpd_proxy
Posted by Boaz Citrin <bc...@gmail.com>.
I found out that I can chain requests i.e.:
a = {couch_httpd_proxy, handle_proxy_req,
<<"http://couchdb:5984<http://server:1234/c>
">>}
b = {couch_httpd_proxy, handle_proxy_req, <<"http://server:1234/c">>}
But that means that I cannot rewrite "b" (when it doesn't come with "a/"
before) and also it results an extra request.
Any idea?
On Wed, Jan 15, 2014 at 3:18 PM, Boaz Citrin <bc...@gmail.com> wrote:
> Hello,
>
> I am trying to achieve Url rewrite of this form:
>
> http://couchdb:5984/a/b/* => http://server:1234/c/*
>
> Tried this without success:
> a/b = {couch_httpd_proxy, handle_proxy_req, <<"http://server:1234/c">>}
>
> Getting:
> {"error":"not_found","reason":"no_db_file"}
>
> I wonder if I need to escape the "/" somehow. Tried a%2Fb but got the same
> result.
>
> Any idea?
>
> Thanks!
>
> Boaz
>
>