plasmabio / tljh-repo2docker

Plugin for The Littlest JupyterHub to build multiple user environments with repo2docker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"Show Logs" fails due to missing _xsrf token with JupyterHub 4

yamaton opened this issue · comments

Description

"Show Logs", displaying environment build logs, does not work with the current tljh version (JupyterHub 4).

Screenshot 2023-11-08 170307

Discussion

The feature fails because the _xsrf token, required since JupyterHub 4, is missing from the request. The tljh-repo2docker's "Show Logs" does not use JHAPI when displaying the terminal, which means we need to handle the XSRF token explicitly.

Reference

XSRF in JupyterHub 4:

JHAPI implementation: https://github.com/jupyterhub/jupyterhub/blob/cf69c0a4cb75ca4cb528538cfaf2f1373b129b7c/share/jupyterhub/static/js/jhapi.js