Updated the express api to only listen on localhost (#5)

This commit is contained in:
Matthieu Le brazidec 2020-02-01 20:55:05 +01:00 committed by GitHub
parent a59cc16f34
commit 30844cb51b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "tidal-hifi", "name": "tidal-hifi",
"version": "0.1.0", "version": "0.5.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@ -53,7 +53,7 @@ expressModule.run = function(mainWindow) {
if (store.get(settings.api)) { if (store.get(settings.api)) {
let port = store.get(settings.apiSettings.port); let port = store.get(settings.apiSettings.port);
expressInstance = expressApp.listen(port, () => {}); expressInstance = expressApp.listen(port, "127.0.0.1", () => {});
expressInstance.on("error", function(e) { expressInstance.on("error", function(e) {
let message = e.code; let message = e.code;
if (e.code === "EADDRINUSE") { if (e.code === "EADDRINUSE") {