remove more tls stuff

pull/4/head
Cameron Clough 2022-01-21 00:57:28 +00:00
parent f4017026e8
commit bfb3ae41ce
2 changed files with 4 additions and 18 deletions

View File

@ -8,11 +8,6 @@ const config = {
httpInterface: '0.0.0.0',
httpPort: 3000,
httpsInterface: '0.0.0.0',
httpsPort: 4430,
sslKey: 'certs/retropilot.key',
sslCrt: 'certs/retropilot.crt',
canSendMail: true, // Skips sending mail, all attempted mail is logged under DEBUG
smtpHost: 'localhost', // credentials for smtp server to send account registration mails. if not filled in, get the generated tokens from the server.log manually
smtpPort: 25,

View File

@ -1,9 +1,9 @@
import WebSocket, { WebSocketServer } from 'ws'; import cookie from 'cookie';
import { WebSocketServer } from 'ws';
import cookie from 'cookie';
import jsonwebtoken from 'jsonwebtoken';
import httpsServer from 'https';
import httpServer from 'http';
import { readFileSync } from 'fs';
import log4js from 'log4js';
import models from '../../models/index.model';
import config from '../../config';
import helperFunctions from './helpers';
@ -19,16 +19,7 @@ let helpers;
let wss;
function __server() {
let server;
if (config.athena.secure) {
server = httpsServer.createServer({
cert: readFileSync(config.sslCrt),
key: readFileSync(config.sslKey),
});
} else {
server = httpServer.createServer();
}
const server = httpServer.createServer();
wss = new WebSocketServer({ server }, { path: '/ws/v2/', handshakeTimeout: 500 });