feat(ipc): add renderer:clear-http-https-agent-cache handler

This commit is contained in:
lohit-bruno
2026-03-03 09:28:36 +05:30
parent 93600b5da8
commit a5ff9cf144

View File

@@ -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;
});