I'm using a reverse proxy in front of my Unraid server, which results in a failed VM Console connection due to the wrong host parameter value being used for the console URL. That URL is then used to open the console in a new window. A manual fix is currently required for making the connection working again, by fixing the host parameter.
Specific example
I'm using a reverse proxy with unraid.internal and the target of 10.10.10.10 as my Unraid server. Right now
wrong: https://unraid.internal/plugins/dynamix.vm.manager/vnc.html?v=0000000000&resize=scale&autoconnect=true&host=10.10.10.10:443&port=&path=/wsproxy/5701/
correct: https://unraid.internal/plugins/dynamix.vm.manager/vnc.html?v=0000000000&resize=scale&autoconnect=true&host=unraid.internal:443&port=&path=/wsproxy/5701/
NOTE: I do not know how relevant the port itself is in the end, as I haven't seen an Unraid Webserver on a non-standard port yet. It is just included by default in the Host header (see below).
Other Reports
Relevant Code / Infos
The code that generates the URL in question:
|
$vmrcurl = autov('/plugins/dynamix.vm.manager/'.$protocol.'.html',true).'&autoconnect=true&host='._var($_SERVER,'HTTP_HOST'); |
Possible headers with priority in that order (from top to bottom):
Forwarded: Modern Standard for communicating the host from a reverse proxy or similar. See RFC 7239 or MDN Reference for details.
X-Forwarded-Host: Non-standard but common header to communicate the host via reverse proxy, see MDN Reference.
Host: The header used in the current function, ignoring reverse proxy specific headers, see MDN Reference.
NOTE: Would be willing to open a PR, but I'm not familiar with the codebase, nor do I have a development setup for unraid itself, so I'm refraining from doing so for now.
I'm using a reverse proxy in front of my Unraid server, which results in a failed VM Console connection due to the wrong
hostparameter value being used for the console URL. That URL is then used to open the console in a new window. A manual fix is currently required for making the connection working again, by fixing thehostparameter.Specific example
I'm using a reverse proxy with
unraid.internaland the target of10.10.10.10as my Unraid server. Right nowOther Reports
Relevant Code / Infos
The code that generates the URL in question:
webgui/emhttp/plugins/dynamix.vm.manager/include/VMajax.php
Line 136 in d216216
Possible headers with priority in that order (from top to bottom):
Forwarded: Modern Standard for communicating the host from a reverse proxy or similar. See RFC 7239 or MDN Reference for details.X-Forwarded-Host: Non-standard but common header to communicate the host via reverse proxy, see MDN Reference.Host: The header used in the current function, ignoring reverse proxy specific headers, see MDN Reference.