Skip to content

Commit

Permalink
Merge pull request #5898 from minrk/allow_origin_wildcard
Browse files Browse the repository at this point in the history
handle allow_origin='*' in check_referer
  • Loading branch information
kevin-bates authored Dec 19, 2020
2 parents 5abcbd3 + 067c399 commit 24bf3a5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions notebook/base/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,10 @@ def check_referer(self):
Used on GET for api endpoints and /files/
to block cross-site inclusion (XSSI).
"""

if self.allow_origin == "*" or self.skip_check_origin():
return True

host = self.request.headers.get("Host")
referer = self.request.headers.get("Referer")

Expand Down

0 comments on commit 24bf3a5

Please sign in to comment.