Skip to content

Convos does not work properly behind reverse proxy with path #963

@gschwind

Description

@gschwind

Describe the bug
When convos is behind a reverse proxy with a path such as https://dnsname.com/convos, Convos does not work properly.

After investigating, several URL used in the web interface does not have the path. For instance:

convos request https://dnsname.com/api , where it should be https://dnsname.com/convos/api, I guess

To Reproduce

  1. Setup apache with:

    # Enable Convos to construct correct URLs by passing on custom headers.
    ProxyRequests Off
    ProxyPreserveHost On
    
    RequestHeader set X-Request-Base "https://dnsname.com/convos"
    
    # https://httpd.apache.org/docs/current/mod/mod_remoteip.html
    RemoteIPHeader X-Forwarded-For
    
    # http://httpd.apache.org/docs/2.0/mod/core.html#limitrequestbody
    LimitRequestBody 0
    
    # Pass requests on to Convos
    ProxyPass /convos/events ws://localhost:3001/events
    ProxyPass /convos/ http://localhost:3001/ keepalive=On
    ProxyPassReverse /convos/ http://localhost:3001/convos/
    
  2. start convos with:

    CONVOS_REQUEST_BASE="https://dnsname.com/convos/" CONVOS_REVERSE_PROXY=1 ./script/convos daemon --listen http://127.0.0.1:3001

  3. Open https://dnsname.com/convos

Convos show the login dialog but is partially loaded and does not work properly. Several HTTP resources aren't loaded and several HTTP request fail.

Expected behavior
Convos load all resource properly and can be used under a given http path

Environment:

  • OS: Linux/Debian on aarch64
  • Browser firefox on Linux/amd64
  • Version 140.10.1esr
  • IRC none (cannot login)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions