File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,10 @@ export const createApp = async (options: CreateAppOptions): Promise<{
77
77
} ;
78
78
79
79
const isEncrypted = ( socket : net . Socket ) : boolean => {
80
+ if ( options . bypassAuth ) {
81
+ return true ;
82
+ }
83
+
80
84
// tslint:disable-next-line:no-any
81
85
return ( socket as any ) . encrypted ;
82
86
} ;
@@ -125,7 +129,7 @@ export const createApp = async (options: CreateAppOptions): Promise<{
125
129
} ) ;
126
130
} ) ;
127
131
128
- const server = httpolyglot . createServer ( options . httpsOptions || certs , app ) as http . Server ;
132
+ const server = httpolyglot . createServer ( options . bypassAuth ? { } : options . httpsOptions || certs , app ) as http . Server ;
129
133
const wss = new ws . Server ( { server } ) ;
130
134
131
135
wss . shouldHandle = ( req ) : boolean => {
You can’t perform that action at this time.
0 commit comments