mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-27 04:20:22 +08:00
only set allow_origin_pat if defined
fixes the default behavior to be as intended (require Origin == Host)
This commit is contained in:
parent
d4ffeaa1f8
commit
55f455ab55
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user