[mirotalksfu] - #115 Added the ability to enable or disable stats from the config.js file
هذا الالتزام موجود في:
@@ -124,6 +124,13 @@ if (sentryEnabled) {
|
||||
*/
|
||||
}
|
||||
|
||||
// Stats
|
||||
const defaultStats = {
|
||||
enabled: true,
|
||||
src: 'https://stats.mirotalk.com/script.js',
|
||||
id: '41d26670-f275-45bb-af82-3ce91fe57756',
|
||||
};
|
||||
|
||||
// OpenAI/ChatGPT
|
||||
let chatGPT;
|
||||
if (config.chatGPT.enabled) {
|
||||
@@ -319,6 +326,13 @@ function startServer() {
|
||||
res.sendFile(views.about);
|
||||
});
|
||||
|
||||
// Get stats endpoint
|
||||
app.get(['/stats'], (req, res) => {
|
||||
const stats = config.stats ? config.stats : defaultStats;
|
||||
// log.debug('Send stats', stats);
|
||||
res.send(stats);
|
||||
});
|
||||
|
||||
// ####################################################
|
||||
// API
|
||||
// ####################################################
|
||||
|
||||
@@ -117,6 +117,15 @@ module.exports = {
|
||||
enabled: false,
|
||||
url: '',
|
||||
},
|
||||
stats: {
|
||||
/*
|
||||
Umami: https://github.com/umami-software/umami
|
||||
We use Umami to track aggregated usage statistics in order to improve our service.
|
||||
*/
|
||||
enabled: true,
|
||||
src: 'https://stats.mirotalk.com/script.js',
|
||||
id: '41d26670-f275-45bb-af82-3ce91fe57756',
|
||||
},
|
||||
mediasoup: {
|
||||
// Worker settings
|
||||
numWorkers: Object.keys(os.cpus()).length,
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم