##// END OF EJS Templates
add ssl_options config value...
Min RK -
Show More
@@ -0,0 +1,4 b''
1 * add ``NotebookApp.ssl_options`` config value.
2 This is passed through to tornado HTTPServer,
3 and allows SSL configuration beyong specifying a cert and key,
4 such as disabling SSLv3.
@@ -505,7 +505,11 b' class NotebookApp(BaseIPythonApplication):'
505 505 tornado_settings = Dict(config=True,
506 506 help="Supply overrides for the tornado.web.Application that the "
507 507 "IPython notebook uses.")
508
508
509 ssl_options = Dict(config=True,
510 help="""Supply SSL options for the tornado HTTPServer.
511 See the tornado docs for details.""")
512
509 513 jinja_environment_options = Dict(config=True,
510 514 help="Supply extra arguments that will be passed to Jinja environment.")
511 515
@@ -826,11 +830,13 b' class NotebookApp(BaseIPythonApplication):'
826 830 self.log, self.base_url, self.default_url, self.tornado_settings,
827 831 self.jinja_environment_options
828 832 )
833 ssl_options = self.ssl_options
829 834 if self.certfile:
830 ssl_options = dict(certfile=self.certfile)
831 if self.keyfile:
832 ssl_options['keyfile'] = self.keyfile
833 else:
835 ssl_options['certfile'] = self.certfile
836 if self.keyfile:
837 ssl_options['keyfile'] = self.keyfile
838 if not ssl_options:
839 # None indicates no SSL config
834 840 ssl_options = None
835 841 self.login_handler_class.validate_security(self, ssl_options=ssl_options)
836 842 self.http_server = httpserver.HTTPServer(self.web_app, ssl_options=ssl_options,
General Comments 0
You need to be logged in to leave comments. Login now