-
Notifications
You must be signed in to change notification settings - Fork 80
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
Run proxy from a subfolder #37
Comments
|
It's indeed possible to do conditionally reverse proxy requests on the web server (we have this already working on Windows IIS). But will HLS-Proxy be able to correctly rewrite the urls in the m3u8 file to include the sub folder? Is this configurable? Because internally it runs on port 8080 (for example) without a sub folder. |
notes:
|
Thanks for all the info. I created the following reverse proxy rule on the web server:
What I was missing was that I had to put the subfolder in the HLS proxy URL. The remaining issue I have is to handle the HTTPS encryption on the front-end web server. Requesting url: https://host/hls-proxy/aHR0cHM6Ly90ZXN0LXN0cmVhbXMubXV4LmRldi94MzZ4aHp6L3gzNnhoenoubTN1OA==.m3u8 This results in:
I can't auto-redirect it to HTTPS because the website uses HTTPS, so it gets blocked in the browser: "Mixed Content: The page at '<URL>' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint '<URL>'. This request has been blocked; the content must be served over HTTPS." I can probably workaround this by configuring the certificates in the HLS proxy directly, although it's not ideal. |
hmm.. good point. as you say, it isn't ideal.. but it would work to:
alternatively, maybe I should:
In which case:
I can't imagine this easter-egg of an exception biting anybody unexpectedly. |
note (to self).. the touchpoint for making this change is here for example: result.redirected_base_url = `${ (is_secure || (host && host.endsWith(':443'))) ? 'https' : 'http' }://${host || req.headers.host}${expressjs.get_base_req_url(req) || matches[1] || ''}` |
v3.4.1 adds that change.. |
Awesome, this is great. Tested and deployed, works perfect. Thanks, very much appreciate your effort on this. |
I would like to use this proxy on an existing website. I'm not allowed to open additional ports. So I was thinking to proxy incoming requests via our webserver to this HLS proxy. This seems to be possible by specifying the host and port in the
--host
option (as said here).As I want to offer the website and the HLS proxy on the same host:port, I would need to run this HLS proxy from a sub folder.
Is this possible?
The text was updated successfully, but these errors were encountered: