Dmitry Kutin created GUACAMOLE-1842:
---------------------------------------

             Summary: Include a more descriptive message on tunnel close due to 
missing header on CORS
                 Key: GUACAMOLE-1842
                 URL: https://issues.apache.org/jira/browse/GUACAMOLE-1842
             Project: Guacamole
          Issue Type: Improvement
          Components: guacamole-common-js
            Reporter: Dmitry Kutin


When using an _*HTTPTunnel*_ in _guacamole-common-js_ to interact with a 
cross-domain _guacamole-server_ instance, the tunnel abruptly closes after 
being assigned a UUID with the status code _{*}UPSTREAM_NOT_FOUND{*},_ and no 
additional message.



After having looked through the plugin _guacamole-common-js_ source, the closed 
tunnel was triggered due to the _*XMLHttpRequest*_ library's 
*_getResponseHeader_* method not having access to custom headers for CORS 
requests unless they were explicitly included in an 
*_Access-Control-Expose-Headers_* header:

 
{code:java}
Access-Control-Expose-Headers: Guacamole-Tunnel-Token{code}
 

My proposal is to include this either in the plugin as a more descriptive error 
message, or in the documentation for users who may encounter the same. Using 
the status code *UPSTREAM_NOT_FOUND* without additional context seems 
misleading in this case.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to