Merge pull request #5898 from minrk/allow_origin_wildcard

handle allow_origin='*' in check_referer
This commit is contained in:
Kevin Bates 2020-12-19 10:07:18 -08:00 committed by GitHub
commit 24bf3a5a73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -404,6 +404,10 @@ class IPythonHandler(AuthenticatedHandler):
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")