mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-18 15:33:02 +00:00
respect jupyter-server disable_check_xsrf setting
allows global disable of xsrf checks in single-user servers
This commit is contained in:
@@ -987,7 +987,9 @@ class HubOAuth(HubAuth):
|
||||
|
||||
Applies JupyterHub check_xsrf_cookie if not token authenticated
|
||||
"""
|
||||
if getattr(handler, '_token_authenticated', False):
|
||||
if getattr(handler, '_token_authenticated', False) or handler.settings.get(
|
||||
"disable_check_xsrf", False
|
||||
):
|
||||
return
|
||||
check_xsrf_cookie(handler)
|
||||
|
||||
|
Reference in New Issue
Block a user