couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Frawley (JIRA)" <j...@apache.org>
Subject [jira] Commented: (COUCHDB-321) Futon breaks when used with a reverse proxy
Date Thu, 14 May 2009 17:04:45 GMT

    [ https://issues.apache.org/jira/browse/COUCHDB-321?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12709469#action_12709469
] 

Mike Frawley commented on COUCHDB-321:
--------------------------------------

Thanks Jack, I was having this same problem which was rather annoying.

I used this simpler logic to get the urlPrefix:

    urlPrefix: window.location.pathname.split("/_utils/")[0]


I'm wondering if prepending the urlPrefix should be done in $.ajaxsetup() instead of every
ajax call, which could make it a bit easier to manage.


> Futon breaks when used with a reverse proxy
> -------------------------------------------
>
>                 Key: COUCHDB-321
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-321
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Administration Console
>    Affects Versions: 0.9
>         Environment: Affects all platforms.
>            Reporter: Jack Moffitt
>            Priority: Minor
>         Attachments: futon.patch
>
>
> It is often convenient to reverse proxy CouchDB at a url like /couch.  Unfortunately,
while CouchDB will work perfectly in this situation, Futon cannot handle it as jquery.couch.js
uses absolute URLs to access all CouchDB functions.
> I've attached a small patch that fixes this problem by:
> 1. Adding a urlPrefix attribute to $.couch which it uses to construct its URLs.
> 2. Adding logic to the futon.js constructor that figures out a suitable prefix and sets
$.couch.urlPrefix to use this.
> Any client code that makes use of $.couch will need to do something similar.  Since only
the application and the adminstrator will know what the prefix should be or how to deduce
it, I didn't really know of a better way to handle this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message