Browse Source

fix server runner

Steven Silvester 4 years ago
parent
commit
c8deed1706
1 changed files with 9 additions and 4 deletions
  1. 9 4
      testutils/src/start_jupyter_server.ts

+ 9 - 4
testutils/src/start_jupyter_server.ts

@@ -5,7 +5,7 @@ import * as fs from 'fs';
 import * as path from 'path';
 
 import { PageConfig, URLExt } from '@jupyterlab/coreutils';
-import { PromiseDelegate, UUID } from '@lumino/coreutils';
+import { PromiseDelegate } from '@lumino/coreutils';
 import { sleep } from './common';
 
 /**
@@ -202,8 +202,7 @@ namespace Private {
    */
   export function handleConfig(): string {
     // Set up configuration.
-    const token = UUID.uuid4();
-    PageConfig.setOption('token', token);
+    PageConfig.setOption('token', '');
     PageConfig.setOption('terminalsAvailable', 'true');
 
     const configDir = mktempDir('config');
@@ -216,7 +215,13 @@ namespace Private {
 
     const configData = {
       LabApp: { user_settings_dir, workspaces_dir, app_dir },
-      ServerApp: { token, open_browser: false, notebook_dir },
+      ServerApp: {
+        token: '',
+        open_browser: false,
+        notebook_dir,
+        disable_check_xsrf: true,
+        allow_origin: '*'
+      },
       MultiKernelManager: {
         default_kernel_name: 'echo'
       },