In the web socket connection request header, PCS device will send the request to the backend with a parameter called "Origin". This parameter will contain the PCS URL.
GET ws://abc.xyz.com/?encoding=text HTTP/1.1 <--- Back end URL
Origin: http://vpn.xyz.com <---- Appliance's URL
Cookie: __utma=99as
Connection: Upgrade
Host: echo.websocket.org
Sec-WebSocket-Key: uRovscZjNol/umbTt5uKmw==
Upgrade: websocket
Sec-WebSocket-Version: 13
If this PCS URL (in the Origin parameter) is not added, under the WebSocket Trusted Origin Server List on the Citrix Server, the server will close the TCP connection causing the client browser to receive a '500 Internal Server Error'. This is a security measure from the Citrix side.