butlerx / wetty

Terminal in browser over http/https. (Ajaxterm/Anyterm alternative, but much better)

Home Page:https://butlerx.github.io/wetty

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot use custom subpath with rewrite rules

bahamut657 opened this issue · comments

Describe the bug
It seems that if WeTTY is behind a reverse proxy, the $request_uri must be the same on proxy side and on wetty side too.
In depth, it seems that Socket.io connection is made using window.location.origin, but this breaks this use case (also css and other resource are missing)

To Reproduce
Steps to reproduce the behavior:

  1. Start Wetty with BASE="/" and PORT=3000
  2. Configure NGINX to expose a custom URI link /my/custom/path/ and to proxy the request to 127.0.0.1:3000/
  3. Trying to open http:///my/custom/path show a broken page. From Network panel I can see WS trying to connect to (without /my/custom/path/)

Expected behavior
The connection is made using relative URLs.
The resources are loaded using relative URLs

Additional context
Are there any possible way to manage it? I cannot find a way to work on.

Best regards and good job for the nice work.

Stale issue message