Skip to content

Commit 24bf3a5

Browse files
authored
Merge pull request jupyter#5898 from minrk/allow_origin_wildcard
handle allow_origin='*' in check_referer
2 parents 5abcbd3 + 067c399 commit 24bf3a5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

notebook/base/handlers.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,10 @@ def check_referer(self):
404404
Used on GET for api endpoints and /files/
405405
to block cross-site inclusion (XSSI).
406406
"""
407+
408+
if self.allow_origin == "*" or self.skip_check_origin():
409+
return True
410+
407411
host = self.request.headers.get("Host")
408412
referer = self.request.headers.get("Referer")
409413

0 commit comments

Comments
 (0)