Skip to content

Commit

Permalink
clear cookies on each run
Browse files Browse the repository at this point in the history
  • Loading branch information
blarfoon committed Jun 17, 2022
1 parent 74600a9 commit d865e6b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Empty file modified .husky/pre-commit
100644 → 100755
Empty file.
8 changes: 6 additions & 2 deletions public/electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,9 @@ const removeOriginHeader = (details, callback) => {

ipcMain.handle('download-optedout-mod', async (e, { url, filePath }) => {
let win = new BrowserWindow();
win.webContents.openDevTools();

await win.webContents.session.clearCache();
await win.webContents.session.clearStorageData();

win.webContents.session.webRequest.onBeforeSendHeaders(removeOriginHeader);

Expand Down Expand Up @@ -727,7 +729,9 @@ ipcMain.handle('download-optedout-mod', async (e, { url, filePath }) => {

ipcMain.handle('download-optedout-mods', async (e, { mods, instancePath }) => {
let win = new BrowserWindow();
win.webContents.openDevTools();

await win.webContents.session.clearCache();
await win.webContents.session.clearStorageData();

win.webContents.session.webRequest.onBeforeSendHeaders(removeOriginHeader);

Expand Down

0 comments on commit d865e6b

Please sign in to comment.