8000 Incorrect Relative Paths for Resources - Cannot Reverse Proxy · Issue #94 · getkaiwa/kaiwa · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Incorrect Relative Paths for Resources - Cannot Reverse Proxy #94
Open
@dnut

Description

@dnut

Kaiwa uses paths relative to root, eg:

/styles.nonCached.css
/app.noncached.js
/config.js

This causes a problem when reverse proxying. You can reverse proxy a subdomain just fine, say chat.example.com, because your resources would be at root. However, I don't pay for wildcard ssl, so I want to reverse proxy example.com/chat to example.com:8000. All the paths given by Kaiwa are relative to root, so it's looking for example.com/config.js instead of example.com/chat/config.js.

There is a simple fix for this. Just add a dot in front of every path to make the paths more relative:

./styles.nonCached.css
./app.noncached.js
./config.js

I went through the jade views and tried implementing this fix, but it only fixed some minor things like images. Overall the client is still useless when reverse proxied through a non-root path because I can't find all the paths that need fixing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0