-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
handle allow_origin='*' in check_referer #5898
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Min!
notebook/base/handlers.py
Outdated
@@ -380,7 +380,7 @@ def check_origin(self, origin_to_satisfy_tornado=""): | |||
|
|||
# Check CORS headers | |||
if self.allow_origin: | |||
allow = self.allow_origin == origin | |||
allow = self.allow_origin == "*" or self.allow_origin == origin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change more for synergy with the change below? Because it seems like this code above is addressing the wildcard.
Hmm. In checking to make sure this issue would also be present in jupyter server, I found that |
allow_origin can be the wildcard '*' to allow any host check_referer should match check_origin
b8458eb
to
067c399
Compare
@kevin-bates good catch! I updated to apply the same logic already in check_origin to check_referer |
allow_origin can be the wildcard '*' to allow any host
applies logic already in check_origin to check_referer