@@ -15,7 +15,6 @@ describe("express-util", function () {
15
15
const result = isAllowedWebsocketDomain (
16
16
"http://3000-moccasin-ferret-155799b3.ws-eu.gpl-2732-ws-csrf.staging.gitpod.io" ,
17
17
HOSTURL_HOSTNAME ,
18
- false ,
19
18
) ;
20
19
expect ( result ) . to . be . false ;
21
20
} ) ;
@@ -24,24 +23,18 @@ describe("express-util", function () {
24
23
const result = isAllowedWebsocketDomain (
25
24
"http://moccasin-ferret-155799b3.ws-eu.gpl-2732-ws-csrf.staging.gitpod.io" ,
26
25
HOSTURL_HOSTNAME ,
27
- false ,
28
26
) ;
29
27
expect ( result ) . to . be . true ;
30
28
} ) ;
31
29
32
30
it ( "should return true for dashboard" , function ( ) {
33
- const result = isAllowedWebsocketDomain (
34
- "http://gpl-2732-ws-csrf.staging.gitpod.io" ,
35
- HOSTURL_HOSTNAME ,
36
- false ,
37
- ) ;
31
+ const result = isAllowedWebsocketDomain ( "http://gpl-2732-ws-csrf.staging.gitpod.io" , HOSTURL_HOSTNAME ) ;
38
32
expect ( result ) . to . be . true ;
39
33
} ) ;
40
34
it ( "should return false for workspace-port locations (strict)" , function ( ) {
41
35
const result = isAllowedWebsocketDomain (
42
36
"http://3000-moccasin-ferret-155799b3.ws-eu.gpl-2732-ws-csrf.staging.gitpod.io" ,
43
37
HOSTURL_HOSTNAME ,
44
- true ,
45
38
) ;
46
39
expect ( result ) . to . be . false ;
47
40
} ) ;
@@ -50,17 +43,12 @@ describe("express-util", function () {
50
43
const result = isAllowedWebsocketDomain (
51
44
"http://moccasin-ferret-155799b3.ws-eu.gpl-2732-ws-csrf.staging.gitpod.io" ,
52
45
HOSTURL_HOSTNAME ,
53
- true ,
54
46
) ;
55
47
expect ( result ) . to . be . false ;
56
48
} ) ;
57
49
58
50
it ( "should return true for dashboard (strict)" , function ( ) {
59
- const result = isAllowedWebsocketDomain (
60
- "http://gpl-2732-ws-csrf.staging.gitpod.io" ,
61
- HOSTURL_HOSTNAME ,
62
- true ,
63
- ) ;
51
+ const result = isAllowedWebsocketDomain ( "http://gpl-2732-ws-csrf.staging.gitpod.io" , HOSTURL_HOSTNAME ) ;
64
52
expect ( result ) . to . be . true ;
65
53
} ) ;
66
54
} ) ;
@@ -70,34 +58,24 @@ describe("express-util", function () {
70
58
const result = isAllowedWebsocketDomain (
71
59
"https://8000-black-capybara-dy6e3fgz.ws-eu08.gitpod.io" ,
72
60
HOSTURL_HOSTNAME ,
73
- false ,
74
61
) ;
75
62
expect ( result ) . to . be . false ;
76
63
} ) ;
77
64
78
65
it ( "should return true for workspace locations" , function ( ) {
79
- const result = isAllowedWebsocketDomain (
80
- "https://bronze-bird-p2q226d8.ws-eu08.gitpod.io" ,
81
- HOSTURL_HOSTNAME ,
82
- false ,
83
- ) ;
66
+ const result = isAllowedWebsocketDomain ( "https://bronze-bird-p2q226d8.ws-eu08.gitpod.io" , HOSTURL_HOSTNAME ) ;
84
67
expect ( result ) . to . be . true ;
85
68
} ) ;
86
69
it ( "should return false for workspace-port locations (strict)" , function ( ) {
87
70
const result = isAllowedWebsocketDomain (
88
71
"https://8000-black-capybara-dy6e3fgz.ws-eu08.gitpod.io" ,
89
72
HOSTURL_HOSTNAME ,
90
- true ,
91
73
) ;
92
74
expect ( result ) . to . be . false ;
93
75
} ) ;
94
76
95
77
it ( "should return false for workspace locations (strict)" , function ( ) {
96
- const result = isAllowedWebsocketDomain (
97
- "https://bronze-bird-p2q226d8.ws-eu08.gitpod.io" ,
98
- HOSTURL_HOSTNAME ,
99
- true ,
100
- ) ;
78
+ const result = isAllowedWebsocketDomain ( "https://bronze-bird-p2q226d8.ws-eu08.gitpod.io" , HOSTURL_HOSTNAME ) ;
101
79
expect ( result ) . to . be . true ;
102
80
} ) ;
103
81
} ) ;
0 commit comments