Skip to content

Commit 0612748

Browse files
committed
set xsrf cookie on base url
avoids collisions across a given host
1 parent 6c8c923 commit 0612748

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

jupyter_server/serverapp.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,10 @@ def init_settings(
356356

357357
# allow custom overrides for the tornado web app.
358358
settings.update(settings_overrides)
359+
360+
if base_url and "xsrf_cookie_kwargs" not in settings:
361+
# set xsrf cookie on base_url
362+
settings["xsrf_cookie_kwargs"] = {"path": base_url}
359363
return settings
360364

361365
def init_handlers(self, default_services, settings):

0 commit comments

Comments
 (0)