remove more tls stuff
parent
f4017026e8
commit
bfb3ae41ce
|
@ -8,11 +8,6 @@ const config = {
|
||||||
httpInterface: '0.0.0.0',
|
httpInterface: '0.0.0.0',
|
||||||
httpPort: 3000,
|
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
|
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
|
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,
|
smtpPort: 25,
|
||||||
|
|
|
@ -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 jsonwebtoken from 'jsonwebtoken';
|
||||||
import httpsServer from 'https';
|
|
||||||
import httpServer from 'http';
|
import httpServer from 'http';
|
||||||
import { readFileSync } from 'fs';
|
|
||||||
import log4js from 'log4js';
|
import log4js from 'log4js';
|
||||||
|
|
||||||
import models from '../../models/index.model';
|
import models from '../../models/index.model';
|
||||||
import config from '../../config';
|
import config from '../../config';
|
||||||
import helperFunctions from './helpers';
|
import helperFunctions from './helpers';
|
||||||
|
@ -19,16 +19,7 @@ let helpers;
|
||||||
let wss;
|
let wss;
|
||||||
|
|
||||||
function __server() {
|
function __server() {
|
||||||
let server;
|
const server = httpServer.createServer();
|
||||||
|
|
||||||
if (config.athena.secure) {
|
|
||||||
server = httpsServer.createServer({
|
|
||||||
cert: readFileSync(config.sslCrt),
|
|
||||||
key: readFileSync(config.sslKey),
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
server = httpServer.createServer();
|
|
||||||
}
|
|
||||||
|
|
||||||
wss = new WebSocketServer({ server }, { path: '/ws/v2/', handshakeTimeout: 500 });
|
wss = new WebSocketServer({ server }, { path: '/ws/v2/', handshakeTimeout: 500 });
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue