only set allow_origin_pat if defined

fixes the default behavior to be as intended (require Origin == Host)
This commit is contained in:
MinRK 2014-07-09 16:25:36 -05:00
parent d4ffeaa1f8
commit 55f455ab55

View File

@ -678,6 +678,7 @@ class NotebookApp(BaseIPythonApplication):
def init_webapp(self):
"""initialize tornado webapp and httpserver"""
self.webapp_settings['allow_origin'] = self.allow_origin
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