From 1ae18b5be755502b9e6bd89cef899705618bf977 Mon Sep 17 00:00:00 2001 From: Satrajit Ghosh Date: Thu, 25 Aug 2011 11:42:17 +0200 Subject: [PATCH 1/2] fix: display secure url with proper protocol --- IPython/frontend/html/notebook/notebookapp.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/IPython/frontend/html/notebook/notebookapp.py b/IPython/frontend/html/notebook/notebookapp.py index 6a9e3797d..759a27709 100644 --- a/IPython/frontend/html/notebook/notebookapp.py +++ b/IPython/frontend/html/notebook/notebookapp.py @@ -263,7 +263,12 @@ class IPythonNotebookApp(BaseIPythonApplication): def start(self): ip = self.ip if self.ip else '[all ip addresses on your system]' - self.log.info("The IPython Notebook is running at: http://%s:%i" % (ip, self.port)) + proto = 'http' + if self.certfile: + proto = 'https' + self.log.info("The IPython Notebook is running at: %s://%s:%i" % (proto, + ip, + self.port)) ioloop.IOLoop.instance().start() #----------------------------------------------------------------------------- From 7d0467df1c4e66ea1bba5d22a4fba4d4e0f3951c Mon Sep 17 00:00:00 2001 From: Satrajit Ghosh Date: Thu, 25 Aug 2011 12:25:26 +0200 Subject: [PATCH 2/2] fix: applied fernando's if simplification fix --- IPython/frontend/html/notebook/notebookapp.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/IPython/frontend/html/notebook/notebookapp.py b/IPython/frontend/html/notebook/notebookapp.py index 759a27709..5821481bf 100644 --- a/IPython/frontend/html/notebook/notebookapp.py +++ b/IPython/frontend/html/notebook/notebookapp.py @@ -263,9 +263,7 @@ class IPythonNotebookApp(BaseIPythonApplication): def start(self): ip = self.ip if self.ip else '[all ip addresses on your system]' - proto = 'http' - if self.certfile: - proto = 'https' + proto = 'https' if self.certfile else 'http' self.log.info("The IPython Notebook is running at: %s://%s:%i" % (proto, ip, self.port))