From 3ee184a6cf3a580dfdf633ffa11c4b2c27e59e19 2014-07-10 15:59:28 From: MinRK Date: 2014-07-10 15:59:28 Subject: [PATCH] Backport PR #6105: only set allow_origin_pat if defined fixes the default behavior to be as intended (require Origin == Host) --- diff --git a/IPython/html/notebookapp.py b/IPython/html/notebookapp.py index db05027..dbec1e3 100644 --- a/IPython/html/notebookapp.py +++ b/IPython/html/notebookapp.py @@ -631,7 +631,8 @@ class NotebookApp(BaseIPythonApplication): def init_webapp(self): """initialize tornado webapp and httpserver""" self.webapp_settings['allow_origin'] = self.allow_origin - self.webapp_settings['allow_origin_pat'] = re.compile(self.allow_origin_pat) + if self.allow_origin_pat: + self.webapp_settings['allow_origin_pat'] = re.compile(self.allow_origin_pat) self.webapp_settings['allow_credentials'] = self.allow_credentials self.web_app = NotebookWebApplication(