-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
The issue I encountered is related to the way the WebSocket URL is constructed when opening the noVNC page with a query parameter for the path. The service provides a cookie for authentication with a path of /A/B, and the noVNC resources are located under /A/B/noVNC, while the WebSocket forwarding is at /A/B/console.
When opening the page with the query parameter path=/A/B/console, the WebSocket URL is automatically formed as ws://host:port//A/B/console, with two slashes in the path. This results in a problem because the browser may treat this as a different path, causing the cookie associated with /A/B to be ignored and not sent with the WebSocket request.
Is the proposed solution of automatically cleaning up duplicate leading slashes in the WebSocket URL path the best approach, or is there a better way to handle this issue?