mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-11 09:51:30 +00:00
feat(ipc): add renderer:clear-http-https-agent-cache handler
This commit is contained in:
@@ -6,6 +6,7 @@ const { getCachedSystemProxy, fetchSystemProxy } = require('../store/system-prox
|
||||
const { resolveDefaultLocation } = require('../utils/default-location');
|
||||
const onboardUser = require('../app/onboarding');
|
||||
const LastOpenedCollections = require('../store/last-opened-collections');
|
||||
const { clearAgentCache } = require('@usebruno/requests');
|
||||
|
||||
const registerPreferencesIpc = (mainWindow) => {
|
||||
const lastOpenedCollections = new LastOpenedCollections();
|
||||
@@ -56,6 +57,14 @@ const registerPreferencesIpc = (mainWindow) => {
|
||||
}
|
||||
});
|
||||
|
||||
ipcMain.handle('renderer:clear-http-https-agent-cache', async () => {
|
||||
try {
|
||||
clearAgentCache();
|
||||
} catch (error) {
|
||||
return Promise.reject(error);
|
||||
}
|
||||
});
|
||||
|
||||
ipcMain.on('renderer:theme-change', (event, theme) => {
|
||||
nativeTheme.themeSource = theme;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user