[spice-html5] Use wss scheme when accessing with https protocol

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Currently the websocket connection is only being established using
the ws scheme.
Adding support for wss scheme when using https protocol to allow
ssl connection.
---
 spice_auto.html | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/spice_auto.html b/spice_auto.html
index 0a01996..b80b01c 100644
--- a/spice_auto.html
+++ b/spice_auto.html
@@ -99,6 +99,9 @@
                     }
                 }
                 port = spice_query_var('port', default_port);
+                if (window.location.protocol == 'https:') {
+                    scheme = "wss://";
+                }
 
                 // If a token variable is passed in, set the parameter in a cookie.
                 // This is used by nova-spiceproxy.
-- 
1.9.3
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]