mirror of
https://github.com/HeyPuter/puter.git
synced 2026-05-12 12:30:47 +00:00
chore: decrease uneeded logging (#2697)
This commit is contained in:
@@ -353,7 +353,6 @@ export class BroadcastService extends BaseService {
|
||||
}
|
||||
|
||||
async #handleWebhookRequest (req, res) {
|
||||
console.log('handling some request via webhooks');
|
||||
const rawBody = req.rawBody;
|
||||
if ( rawBody === undefined || rawBody === null ) {
|
||||
res.status(400).send({ error: { message: 'Missing or invalid body' } });
|
||||
@@ -454,7 +453,6 @@ export class BroadcastService extends BaseService {
|
||||
|
||||
let nextNonce = this.#outgoingNonceByPeer.get(peerId) ?? 0;
|
||||
this.#outgoingNonceByPeer.set(peerId, nextNonce + 1);
|
||||
console.log('Sending webhook message to peer', { peerId });
|
||||
|
||||
const timestamp = Math.floor(Date.now() / 1000);
|
||||
const body = { events };
|
||||
|
||||
@@ -21,10 +21,6 @@ const BaseService = require('../BaseService');
|
||||
const { Context } = require('../../util/context');
|
||||
const config = require('../../config');
|
||||
const isBot = require('isbot');
|
||||
const IGNORED_BOT_UAS = new Set([
|
||||
'Amazon-Route53-Health-Check-Service (ref 7599f3a9-c2af-43ac-a4b6-299da2e3861c; report http://amzn.to/1vsZADi)',
|
||||
'Better Stack Better Uptime Bot Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36',
|
||||
]);
|
||||
/**
|
||||
* @class Requester
|
||||
* @classdesc This class represents a requester in the system. It encapsulates
|
||||
@@ -147,14 +143,6 @@ class RequesterIdentificationExpressMiddleware extends AdvancedBase {
|
||||
x.set('requester', requester);
|
||||
req.requester = requester;
|
||||
|
||||
if ( requester.is_bot ) {
|
||||
if ( IGNORED_BOT_UAS.has(requester.ua) ) {
|
||||
this.log.info('healthcheck bot:', requester.serialize());
|
||||
} else {
|
||||
this.log.info('bot detected', requester.serialize());
|
||||
}
|
||||
}
|
||||
|
||||
next();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user