Skip to content

Commit

Permalink
Add kagi subdomains to host_permissions + auth header inject
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
PixeLInc committed Nov 13, 2024
1 parent 89bdd71 commit 5465c27
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions chrome/manifest.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions firefox/manifest.json
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions shared/src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ async function updateRules() {
],
},
condition: {
urlFilter: '|https://kagi.com/*',
urlFilter: '||kagi.com/',
resourceTypes: ['main_frame', 'xmlhttprequest'],
},
},
Expand Down Expand Up @@ -172,7 +172,7 @@ async function checkForSession() {

browser.webRequest.onBeforeRequest.addListener(
checkForSession,
{ urls: ['https://kagi.com/*'] },
{ urls: ['https://*.kagi.com/*'] },
[],
);

Expand Down

0 comments on commit 5465c27

Please sign in to comment.