Allow wss as websocket protocol

Allow users to establish "wss" (secure web socket) connection to
the container. This is a client side fix but we also need to fix
the server to fully support "wss"

Change-Id: I1dd4f4872be03d1d80e3decbab18b41376230aba
Partial-Bug: #1762511
(cherry picked from commit ff3b380680)
This commit is contained in:
Hongbin Lu 2018-11-24 19:35:42 +00:00
parent 3d944ae67a
commit 617f1126ac
1 changed files with 2 additions and 2 deletions

View File

@ -353,7 +353,7 @@ class WINCHHandler(object):
def do_attach(zunclient, url, container_id, escape, close_wait):
if url.startswith("ws://"):
if url.startswith("ws://") or url.startswith("wss://"):
try:
wscls = AttachClient(zunclient=zunclient, url=url,
id=container_id, escape=escape,
@ -369,7 +369,7 @@ def do_attach(zunclient, url, container_id, escape, close_wait):
def do_exec(zunclient, url, container_id, exec_id, escape, close_wait):
if url.startswith("ws://"):
if url.startswith("ws://") or url.startswith("wss://"):
try:
wscls = ExecClient(zunclient=zunclient, url=url,
exec_id=exec_id,