mirror of https://git.tuxpa.in/a/code-server.git
Bypass certificates on bypass auth
This commit is contained in:
parent
8327da8d00
commit
94edbd59e9
|
@ -77,6 +77,10 @@ export const createApp = async (options: CreateAppOptions): Promise<{
|
|||
};
|
||||
|
||||
const isEncrypted = (socket: net.Socket): boolean => {
|
||||
if (options.bypassAuth) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// tslint:disable-next-line:no-any
|
||||
return (socket as any).encrypted;
|
||||
};
|
||||
|
@ -125,7 +129,7 @@ export const createApp = async (options: CreateAppOptions): Promise<{
|
|||
});
|
||||
});
|
||||
|
||||
const server = httpolyglot.createServer(options.httpsOptions || certs, app) as http.Server;
|
||||
const server = httpolyglot.createServer(options.bypassAuth ? {} : options.httpsOptions || certs, app) as http.Server;
|
||||
const wss = new ws.Server({ server });
|
||||
|
||||
wss.shouldHandle = (req): boolean => {
|
||||
|
|
Loading…
Reference in New Issue