From 6b9e4bff636a2ebad1a62acc80d9969896a1acb3 Mon Sep 17 00:00:00 2001 From: Tom Butcher Date: Sat, 8 Aug 2026 19:05:35 +0100 Subject: [PATCH] Implement URL filtering in Electron navigation handlers - Added checks in the Electron context to prevent navigation to '/favicon.ico', improving the handling of unwanted requests. - Enhanced logging for navigation events to provide better visibility into the navigation process. --- src/components/Dashboard/context/ElectronContext.jsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/components/Dashboard/context/ElectronContext.jsx b/src/components/Dashboard/context/ElectronContext.jsx index a051590..c14ce19 100644 --- a/src/components/Dashboard/context/ElectronContext.jsx +++ b/src/components/Dashboard/context/ElectronContext.jsx @@ -132,6 +132,9 @@ const ElectronProvider = ({ children }) => { applyWindowState ) const unsubNavigate = desktopBridge.onMessage('navigate', (url) => { + if (url.toLowerCase() == '/favicon.ico') { + return + } console.log('[ElectronContext] Navigating to:', url) navigate(url) }) @@ -166,6 +169,10 @@ const ElectronProvider = ({ children }) => { ipcRenderer.on('window-state', windowStateHandler) const navigateHandler = (_event, url) => { + if (url.toLowerCase() == '/favicon.ico') { + return + } + console.log('[ElectronContext] Navigating to:', url) navigate(url) } ipcRenderer.on('navigate', navigateHandler)