diff --git a/tvapp2/index.js b/tvapp2/index.js index 4251469b..4538f44d 100755 --- a/tvapp2/index.js +++ b/tvapp2/index.js @@ -1284,7 +1284,7 @@ const server = http.createServer( ( request, response ) => 'Content-Type': 'application/json' }); - Log.error( `www`, chalk.yellow( `[req]` ), chalk.white( `→` ), chalk.blueBright( `` ), chalk.redBright( `unauthorized (401): restart attempt did not specify api key using ?key=XXX parameter` ), chalk.blueBright( `` ), chalk.gray( `api/restart` ), chalk.blueBright( `` ), chalk.gray( `${ loadFile }` ), chalk.blueBright( `` ), chalk.gray( `${ method }` ) ); + Log.error( `www`, chalk.yellow( `[req]` ), chalk.white( `→` ), chalk.blueBright( `` ), chalk.redBright( `unauthorized (401): restart attempt did not specify api key using ?key=XXX parameter` ), chalk.blueBright( `` ), chalk.gray( `${ clientIp( request ) }` ), chalk.blueBright( `` ), chalk.gray( `api/restart` ), chalk.blueBright( `` ), chalk.gray( `${ loadFile }` ), chalk.blueBright( `` ), chalk.gray( `${ method }` ) ); response.end( JSON.stringify( statusCheck ) ); return; @@ -1318,7 +1318,7 @@ const server = http.createServer( ( request, response ) => { ip: envIpContainer, gateway: envIpGateway, - client: clientIp( response ), + client: clientIp( request ), message: 'Restart command received', status: 'ok', ref: request.url, @@ -1451,7 +1451,7 @@ const server = http.createServer( ( request, response ) => response.setHeader( 'Content-type', fileMime ); response.end( data ); - Log.ok( `www`, chalk.yellow( `[load]` ), chalk.white( `→` ), chalk.blueBright( `` ), chalk.gray( `${ loadFile }` ), chalk.blueBright( `` ), chalk.gray( `${ fileMime }` ) ); + Log.ok( `www`, chalk.yellow( `[load]` ), chalk.white( `→` ), chalk.blueBright( `` ), chalk.gray( `${ clientIp( request ) }` ), chalk.blueBright( `` ), chalk.gray( `${ loadFile }` ), chalk.blueBright( `` ), chalk.gray( `${ fileMime }` ) ); } else { @@ -1464,7 +1464,7 @@ const server = http.createServer( ( request, response ) => { ip: envIpContainer, gateway: envIpGateway, - client: clientIp( response ), + client: clientIp( request ), message: 'Page not found', status: 'healthy', ref: request.url,