From 5465c275c72184b655881575674d297af4bb202c Mon Sep 17 00:00:00 2001 From: PixeL Date: Tue, 12 Nov 2024 22:19:36 -0600 Subject: [PATCH] Add kagi subdomains to host_permissions + auth header inject This allows your Kagi session to be used on *all* of our services (in incognito), rather than just kagi.com. This means things like `translate.kagi.com` (and anything we release in the future!) will automatically pick up your Kagi session and work right away. --- chrome/manifest.json | 4 ++-- firefox/manifest.json | 4 ++-- shared/src/background.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/chrome/manifest.json b/chrome/manifest.json index 058fd4a..851d1e6 100644 --- a/chrome/manifest.json +++ b/chrome/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 3, "name": "Kagi Search for Chrome", - "version": "0.7.2", + "version": "0.7.3", "description": "A simple extension for setting Kagi as a default search engine, and automatically logging in to Kagi in incognito browsing windows", "background": { "service_worker": "src/background.js", @@ -26,7 +26,7 @@ "contextMenus" ], "optional_permissions": ["activeTab"], - "host_permissions": ["https://kagi.com/*"], + "host_permissions": ["https://*.kagi.com/*"], "chrome_settings_overrides": { "search_provider": { "name": "Kagi", diff --git a/firefox/manifest.json b/firefox/manifest.json index 77e4eb6..2637d05 100644 --- a/firefox/manifest.json +++ b/firefox/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 3, "name": "Kagi Search for Firefox", - "version": "0.7.2", + "version": "0.7.3", "description": "A simple helper extension for setting Kagi as a default search engine, and automatically logging in to Kagi in incognito browsing windows.", "background": { "page": "src/background_page.html" @@ -25,7 +25,7 @@ "contextMenus" ], "optional_permissions": ["activeTab"], - "host_permissions": ["https://kagi.com/*"], + "host_permissions": ["https://*.kagi.com/*"], "chrome_settings_overrides": { "search_provider": { "name": "Kagi", diff --git a/shared/src/background.js b/shared/src/background.js index 41e61fb..95066e7 100644 --- a/shared/src/background.js +++ b/shared/src/background.js @@ -136,7 +136,7 @@ async function updateRules() { ], }, condition: { - urlFilter: '|https://kagi.com/*', + urlFilter: '||kagi.com/', resourceTypes: ['main_frame', 'xmlhttprequest'], }, }, @@ -172,7 +172,7 @@ async function checkForSession() { browser.webRequest.onBeforeRequest.addListener( checkForSession, - { urls: ['https://kagi.com/*'] }, + { urls: ['https://*.kagi.com/*'] }, [], );