wetty
wetty copied to clipboard
Cannot use custom subpath with rewrite rules
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:
- Start Wetty with BASE="/" and PORT=3000
- Configure NGINX to expose a custom URI link <HOST>/my/custom/path/ and to proxy the request to 127.0.0.1:3000/
- Trying to open http://<HOST>/my/custom/path show a broken page. From Network panel I can see WS trying to connect to <HOST> (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.