From 01da5277ee64dace1922c6d51a2af7c76223ef72 Mon Sep 17 00:00:00 2001 From: Preston Date: Wed, 7 Apr 2021 22:40:35 -0400 Subject: [PATCH] Add more URLs for consent cookie --- src/main/index.js | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/main/index.js b/src/main/index.js index ae3623df..1867325c 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -249,16 +249,18 @@ function createWindow (useProxy = false, proxyUrl = '') { }) } - mainWindow.webContents.session.cookies.set({ - url: 'https://www.youtube.com', - name: 'CONSENT', - value: 'YES+' - }) - - mainWindow.webContents.session.cookies.set({ - url: 'https://consent.youtube.com', - name: 'CONSENT', - value: 'YES+' + // Set CONSENT cookie on reasonable domains + [ + 'http://www.youtube.com', + 'https://www.youtube.com', + 'http://youtube.com', + 'https://youtube.com' + ].forEach(url => { + mainWindow.webContents.session.cookies.set({ + url: url, + name: 'CONSENT', + value: 'YES+' + }) }) settingsDb.findOne({