@@ -15,7 +15,7 @@ import {
15
15
JupyterFrontEnd ,
16
16
JupyterFrontEndPlugin
17
17
} from '@jupyterlab/application' ;
18
- import { PageConfig } from '@jupyterlab/coreutils' ;
18
+ import { PageConfig , URLExt } from '@jupyterlab/coreutils' ;
19
19
import { IRenderMimeRegistry } from '@jupyterlab/rendermime' ;
20
20
import { KernelAPI , ServerConnection } from '@jupyterlab/services' ;
21
21
import { KernelConnection } from '@jupyterlab/services/lib/kernel/default' ;
@@ -41,8 +41,8 @@ const widgetManager: JupyterFrontEndPlugin<IJupyterWidgetRegistry> = {
41
41
'The Voila Widget Manager plugin must be activated in a VoilaApp'
42
42
) ;
43
43
}
44
- const baseUrl = PageConfig . getBaseUrl ( ) + 'voila/' ;
45
- console . log ( 'bsssase url' , baseUrl ) ;
44
+ const baseUrl = URLExt . join ( PageConfig . getBaseUrl ( ) , 'voila/' ) ;
45
+
46
46
const kernelId = PageConfig . getOption ( 'kernelId' ) ;
47
47
const serverSettings = ServerConnection . makeSettings ( { baseUrl } ) ;
48
48
@@ -74,7 +74,7 @@ const widgetManager: JupyterFrontEndPlugin<IJupyterWidgetRegistry> = {
74
74
const xsrfToken = ( matches && matches [ 1 ] ) || '' ;
75
75
data . append ( '_xsrf' , xsrfToken ) ;
76
76
window . navigator . sendBeacon (
77
- ` ${ baseUrl } api/shutdown/${ kernel . id } ` ,
77
+ URLExt . join ( baseUrl , ` api/shutdown/${ kernel . id } ?_xsrf= ${ xsrfToken } ` ) ,
78
78
data
79
79
) ;
80
80
kernel . dispose ( ) ;
0 commit comments