Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-321

Futon breaks when used with a reverse proxy

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.9
    • Fix Version/s: 0.11
    • Component/s: Futon
    • Labels:
      None
    • Environment:

      Affects all platforms.

      Description

      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.

        Attachments

        1. futon-proxy-fix.diff
          5 kB
          Damjan Georgievski
        2. futon.patch
          3 kB
          Jack Moffitt

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                metajack Jack Moffitt
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: