-
-
Notifications
You must be signed in to change notification settings - Fork 456
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.0.0 Web UI doesn't work behind reverse proxy #340
Comments
I have the same issue. If you view the source in the UI's repo here: https://github.com/datarhei/restreamer-ui/blob/8dbdb3dfc90958d7cbe162b1c826ca7a75666d34/public/index.html I tried manually editing the static UI files in the Docker container to replace the paths in the built files which got it the interface to load but the rest of the UI is still broken (some hard coded paths i didn't get around to finding are still broken) |
Any idea howto solve this issue for beginners and not programmers ? |
This works correctly for me behind a NGINX reverse proxy.
The double listing is to remove the need for the extra page.html |
@MattWAnderson The issue described in the original post (and mine as well) is using mapping an external subpath to the internal root path which is different from your configuration. An example nginx config (with domain: example.com) for that would be the following:
When the UI requests the path "/example.css", Nginx 404s as it can't find the path (outside of the defined location route). The correct path should have been "/somesubpath/example.css" |
Hey folks, Other solution: Use our hosted Restreamer-UI: Mixed content must be allowed for HTTP: Help |
True, this is still broken. A fix is in the pipeline and will be part of the next release. |
In order for the UI to work properly with a relative %PUBLIC_URL% the route for the UI requires a / at the end. This commit is enforcing this. As a consequence, if the UI is behind a reverse proxy, it will still load properly.
Commits (Ingo Oppermann): - Add experimental SRT connection stats and logs - Hide /config/reload endpoint in reade-only mode - Add SRT server - Create v16 in go.mod - Fix data races, tests, lint, and update dependencies - Add trailing slash for routed directories (datarhei/restreamer#340) - Allow relative URLs in content in static routes Co-Authored-By: Ingo Oppermann <[email protected]>
Hi @database64128 This may be due to the following reasons:
You can reopen this ticket at any time! Please do not open related tickets twice. Always answer/ask in the original issue with the same problem. Your datarhei team |
Hello, I'm still experiencing this issue in 2.3. The UI loads fine now after the changes but the API endpoint (after looking through the source code) is still statically pointing to the root path. The code currently constructs the API endpoint URL from the host domain for the current page only. This means if a subpath is used, the API URL will not be correctly constructed. As the web-ui is statically generated (and a dynamic generation adds way too much overhead), one potential solution is to add a new configuration value that contains the subpath string that the server can pass as a cookie to the browser when serving the static files. The JS code can then be modified to parse the cookie data for the subpath value to appropriately construct the API URL. |
I'm using nginx to proxy https://cube64128.xyz/restreamer/ to Restreamer's 8080 port. The UI doesn't work properly because the paths are wrong:
The web UI should use relative paths, or allow the admin to configure a custom path.
The text was updated successfully, but these errors were encountered: