From 66c53c6459571262c42331ac53a4fa344ba7a75b Mon Sep 17 00:00:00 2001 From: Jonatas Evaristo Date: Fri, 26 Apr 2024 15:09:51 -0300 Subject: [PATCH] Custom backgrounds in Teams V2 - disable custom --- app/config/README.md | 2 +- app/mainAppWindow/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/config/README.md b/app/config/README.md index 8c58681..ff8ef58 100644 --- a/app/config/README.md +++ b/app/config/README.md @@ -112,7 +112,7 @@ We added a feature to load custom background images during a video call. This is 2. 3 new command-line parameters `customBGServiceBaseUrl`, `customBGServiceIgnoreMSDefaults` and `customBGServiceConfigFetchInterval` are introduced. See above for details. 3. Custom images are always loaded with `/`. So, you have to make sure the web server is running and `` responds to the request. 4. You can choose any web server of your choice but make sure `Access-Control-Allow-Origin` is set to `*` in response headers from web server. -5. In Teams version 2, this will replace Microsoft's default images. +5. In Teams version 2, this will replace Microsoft's default images. To use standard Microsoft images, you must activate the flag --isCustomBackgroundEnabled=false For apache2, `/etc/apache2/apache2.conf` may need to have an entry like this. ```xml diff --git a/app/mainAppWindow/index.js b/app/mainAppWindow/index.js index ef12232..018c6c2 100644 --- a/app/mainAppWindow/index.js +++ b/app/mainAppWindow/index.js @@ -253,7 +253,7 @@ function onBeforeRequestHandler(details, callback) { callback({ redirectURL: imgUrl }); } // Custom background replace for teams v2 - else if (details.url.startsWith('https://statics.teams.cdn.office.net/evergreen-assets/backgroundimages/')) { + else if (details.url.startsWith('https://statics.teams.cdn.office.net/evergreen-assets/backgroundimages/' && config.isCustomBackgroundEnabled)) { const reqUrl = details.url.replace('https://statics.teams.cdn.office.net/evergreen-assets/backgroundimages/', ''); const imgUrl = getBGRedirectUrl(reqUrl); logger.debug(`Forwarding '${details.url}' to '${imgUrl}'`);