File tree Expand file tree Collapse file tree
jupyterhub/cwh-repo2docker/cwh_repo2docker Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -213,6 +213,21 @@ async def _get_cmd_from_image(self):
213213 cmd = image_info ["Config" ]["Cmd" ]
214214 return cmd
215215
216+ def get_args (self ):
217+ args = super ().get_args ()
218+ username = self .user .name
219+ base_url = self .hub .base_url [:- 4 ]
220+ xsrf_cookie_path = base_url + 'user/' + username + '/'
221+ # workaround when jupyterhub<=4.1.5 is used on single-user server
222+ # https://github.com/jupyterhub/jupyterhub/pull/4750
223+ # https://github.com/jupyterhub/jupyterhub/pull/4771
224+ args .append (
225+ '--ServerApp.tornado_settings='
226+ '{"xsrf_cookie_kwargs":{"path":"'
227+ + xsrf_cookie_path + '"}}' )
228+
229+ return args
230+
216231 async def get_command (self ):
217232 image_cmd = await self ._get_cmd_from_image ()
218233 # override cmd for docker-stacks image
You can’t perform that action at this time.
0 commit comments