diff --git a/zefie_wtvp_minisrv/app.js b/zefie_wtvp_minisrv/app.js index f863ef87..73e3c555 100644 --- a/zefie_wtvp_minisrv/app.js +++ b/zefie_wtvp_minisrv/app.js @@ -556,6 +556,11 @@ async function processURL(socket, request_headers) { socket.minisrv_pc_mode = true; service_name = verifyServicePort("pc_services", socket); if (!service_name) { + if (minisrv_config.services.pc_services.drop_connection_on_wrong_port) { + // just close the connection, no fancy error + socket.end(); + return; + } var errpage = wtvshared.doErrorPage(500, null, socket.minisrv_pc_mode); socket_sessions[socket.id].close_me = true; sendToClient(socket, errpage[0], errpage[1]); diff --git a/zefie_wtvp_minisrv/config.json b/zefie_wtvp_minisrv/config.json index ada51c9b..9cfd4742 100644 --- a/zefie_wtvp_minisrv/config.json +++ b/zefie_wtvp_minisrv/config.json @@ -133,6 +133,7 @@ "port": 1699, "servicevault_dir": "http_pc", "disabled": true, + "drop_connection_on_wrong_port": false, "allow_https": false, "force_https": false }