Cataloghi...
This commit is contained in:
@@ -820,7 +820,7 @@ function startServer(app, port) {
|
||||
// Configurazione CORS dettagliata
|
||||
const corsOptions = {
|
||||
origin: '*',
|
||||
|
||||
|
||||
/*origin: function (origin, callback) {
|
||||
// Array di domini consentiti
|
||||
const allowedOrigins = [
|
||||
@@ -1043,11 +1043,11 @@ function startServer(app, port) {
|
||||
ws.send(JSON.stringify({ type: 'output', data: data }));
|
||||
|
||||
// Controlla se c'è una richiesta di input
|
||||
if (buffer.endsWith(': ') || buffer.includes('? ') ||
|
||||
if (buffer && (buffer.endsWith(': ') || buffer.includes('? ') ||
|
||||
buffer.toLowerCase().includes('password')
|
||||
|| buffer.includes('Inserisci')
|
||||
|| buffer.includes('Inserted')
|
||||
|| buffer.includes('(Y')
|
||||
|| buffer.includes('(Y'))
|
||||
) {
|
||||
ws.send(JSON.stringify({ type: 'input_required', prompt: data.trim() }));
|
||||
buffer = '';
|
||||
|
||||
Reference in New Issue
Block a user