remove https and fix crash when other hotspots connect to us

only_http
Dominic Reich 8 months ago
parent dc9a97383a
commit 005f7c32af
Signed by: dominic
GPG Key ID: BC9D6AE1A3BE169A

@ -1,4 +1,4 @@
const https = require("https");
const http = require("http");
const fs = require("fs");
const ini = require("ini");
const lineReader = require('line-reader');
@ -32,12 +32,8 @@ updatelinks();
let serverPort = inifile.config.port;
const server = https
const server = http
.createServer(
{
key: fs.readFileSync("key.pem"),
cert: fs.readFileSync("cert.pem"),
},
app
)
.listen(serverPort, ()=>{
@ -83,7 +79,7 @@ function updatelinks() {
};
let i = 0;
while (i < lines.length) {
if(lines[i] != "") {
if(lines[i] != "" && lines[i].match(linksregex)) {
var mylinks = lines[i].match(linksregex);
// console.log(JSON.stringify(lines[i]));
var linkrec = {'timestamp':mylinks[1].substr(0,19)+'Z' , 'protocol':mylinks[2] , 'device':mylinks[4],

Loading…
Cancel
Save