[mirotalksfu] - add env BRAND_HTML_INJECTION
هذا الالتزام موجود في:
@@ -72,7 +72,10 @@ class HtmlInjector {
|
||||
|
||||
// Function to inject dynamic data (e.g., OG, TITLE, etc.) into a given file
|
||||
injectHtml(filePath, res) {
|
||||
// return res.send(this.cache[filePath]);
|
||||
// Check if HTML injection is enabled in the config
|
||||
if (this.config?.htmlInjection) {
|
||||
return res.send(this.cache[filePath]);
|
||||
}
|
||||
|
||||
if (!this.cache[filePath]) {
|
||||
log.error(`File not cached: ${filePath}`);
|
||||
|
||||
@@ -64,7 +64,7 @@ dev dependencies: {
|
||||
* @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon
|
||||
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970
|
||||
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
|
||||
* @version 1.9.13
|
||||
* @version 1.9.14
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -107,6 +107,9 @@ const Mattermost = require('./Mattermost');
|
||||
const restrictAccessByIP = require('./middleware/IpWhitelist');
|
||||
const packageJson = require('../../package.json');
|
||||
|
||||
// Branding configuration
|
||||
const brandHtmlInjection = config?.ui?.brand?.htmlInjection ?? true;
|
||||
|
||||
// Incoming Stream to RTPM
|
||||
const { v4: uuidv4 } = require('uuid');
|
||||
const crypto = require('crypto-js');
|
||||
@@ -577,7 +580,7 @@ function startServer() {
|
||||
|
||||
// Brand configuration
|
||||
app.get('/brand', (req, res) => {
|
||||
res.status(200).json({ message: config?.ui?.brand || false });
|
||||
res.status(200).json({ message: brandHtmlInjection ? config?.ui?.brand : false });
|
||||
});
|
||||
|
||||
// main page
|
||||
|
||||
@@ -971,7 +971,13 @@ module.exports = {
|
||||
* Application Branding
|
||||
* --------------------
|
||||
* Core application identity and user interface text elements.
|
||||
*
|
||||
* Note:
|
||||
* Set BRAND_HTML_INJECTION to 'false' to disable HTML injection.
|
||||
* This allows for static branding in the public/views folder, without dynamic content injection.
|
||||
*/
|
||||
htmlInjection: process.env.BRAND_HTML_INJECTION !== 'false',
|
||||
|
||||
app: {
|
||||
language: process.env.UI_LANGUAGE || 'en',
|
||||
name: process.env.APP_NAME || 'MiroTalk SFU',
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم