Merge "Add support for secure websocket connection"

This commit is contained in:
Zuul 2018-11-27 04:22:04 +00:00 committed by Gerrit Code Review
commit 3e24dfcd2a
2 changed files with 11 additions and 0 deletions

View File

@ -34,6 +34,9 @@ def main():
websocketproxy.ZunWebSocketProxy(
listen_host=host,
listen_port=port,
cert=CONF.websocket_proxy.cert,
key=CONF.websocket_proxy.key,
ssl_only=CONF.websocket_proxy.ssl_only,
file_only=True,
RequestHandlerClass=websocketproxy.ZunProxyRequestHandler
).start_server()

View File

@ -78,6 +78,14 @@ Possible values:
* A list where each element is an allowed origin hostnames, else an empty list
"""),
cfg.BoolOpt('ssl_only',
help="Disallow non-encrypted connections."),
cfg.StrOpt('cert',
default='',
help="Path to SSL certificate file."),
cfg.StrOpt('key',
default='',
help="SSL key file (if separate from cert)."),
]
ALL_OPTS = (wsproxy_opts)