couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aurélien Bénel <>
Subject Re: Accessing _utils scripts with reverse proxy and _rewrite?
Date Wed, 24 Nov 2010 16:05:50 GMT
> You can use the port 5984 to access your couchone with rewriting disabled.

Nice to know that, Quentin. However I don't understand how this would solve my problem...

What I would like would be to rewrite:	/mydb/_design/mysoftware/_rewrite/script/couch.js
into:		/_utils/script/couch.js

So that I could get it with http://myreverseproxy/script/couch.js

The idea is that the same app would work:
- directly on CouchOne (with complete _rewrite URLs),
- on CouchOne via a reverse proxy (with short URLs),
- on non routable servers via a reverse proxy. 

We're very close to that... This is the last URL that doesn't work.

If there is no solution for that in CouchDB we'll do that on Cherokee's reverse proxy.



> Hi there,
> We have a functional CouchApp on CouchOne Hosting. We set up a Cherokee
> reverse proxy in order to skip the  "/mydb/_design/mysoftware/_rewrite" part
> of URLs.
> When we did that we realized that we forgot to rewrite one URL:
> "/_utils/script/couch.js".
> Then we added the following rewrite rule: {
>   "from": "script/:script",
>   "to": "../../../_utils/script/:script"
> }
> We got : {"error":"insecure_rewrite_rule","reason":"too many ../..
> segments"}
> The configuration cannot be changed on CouchOne hosting, and it is probably
> true that giving access to "_utils" could be harmful. Is there another way
> to access those scripts than copying scripts in the database scope or
> setting up the rewrite rule directly into Cherokee?
> Regards,
> Aurélien

View raw message