diff --git a/.gitignore b/.gitignore index bbe3b04..4d2e41b 100644 --- a/.gitignore +++ b/.gitignore @@ -6,5 +6,6 @@ build localization/messages localization/translated/en.json .env +.DS_Store *.iml diff --git a/package.json b/package.json index cedf32c..83409dc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@drill4j/browser-extension", - "version": "0.2.2", + "version": "0.2.3", "scripts": { "build": "webpack -p --env.production", "start": "node build-utils/webserver.js", diff --git a/src/background.ts b/src/background.ts index 5e85fab..cf1210c 100644 --- a/src/background.ts +++ b/src/background.ts @@ -38,12 +38,7 @@ function addDrillHeaders({ requestHeaders = [] }: WebRequest.OnBeforeSendHeaders browser.webRequest.onBeforeSendHeaders.addListener( addDrillHeaders, { - urls: [ - 'http://localhost/*', - 'http://*.epam.com/*', - 'https://localhost/*', - 'https://*.epam.com/*', - ], + urls: ['*://*/*'], }, ['blocking', 'requestHeaders'], ); @@ -70,12 +65,7 @@ function checkDrillAgentId({ responseHeaders = [] }: WebRequest.OnHeadersReceive browser.webRequest.onHeadersReceived.addListener( checkDrillAgentId, { - urls: [ - 'http://localhost/*', - 'http://*.epam.com/*', - 'https://localhost/*', - 'https://*.epam.com/*', - ], + urls: ['*://*/*'], }, ['responseHeaders'], ); diff --git a/src/common/connection/configure-axios.ts b/src/common/connection/configure-axios.ts index 7df360b..41f4983 100644 --- a/src/common/connection/configure-axios.ts +++ b/src/common/connection/configure-axios.ts @@ -7,7 +7,7 @@ export async function configureAxios() { const [{ url = '' }] = await browser.tabs.query({ active: true, currentWindow: true }); const hostname = new URL(url).hostname; const { [hostname]: { adminUrl = '' } = {} } = await browser.storage.local.get(hostname); - axios.defaults.baseURL = `https://${adminUrl}/api`; + axios.defaults.baseURL = `http://${adminUrl}/api`; axios.interceptors.request.use( async (config) => { diff --git a/src/common/connection/ws-connection.ts b/src/common/connection/ws-connection.ts index 77efd26..d24e3ff 100644 --- a/src/common/connection/ws-connection.ts +++ b/src/common/connection/ws-connection.ts @@ -10,8 +10,8 @@ export class WsConnection { constructor(adminUrl: string, socket: string = 'drill-admin-socket', token?: string) { this.connection = new WebSocket( adminUrl - ? `wss://${adminUrl}/ws/${socket}?token=${token}` - : `wss://localhost:8443/ws/${socket}?token=${token}`, + ? `ws://${adminUrl}/ws/${socket}?token=${token}` + : `ws://localhost:8090/ws/${socket}?token=${token}`, ); this.onMessageListeners = {}; diff --git a/src/manifest.json b/src/manifest.json index ae6095f..6cbcdee 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -1,21 +1,11 @@ { "name": "Drill4J Browser Extension", - "version": "0.2.2", + "version": "0.2.3", "background": { "page": "background.html" }, "options_page": "options.html", - "permissions": [ - "tabs", - "webRequest", - "webRequestBlocking", - "activeTab", - "storage", - "http://localhost/*", - "http://*.epam.com/*", - "https://localhost/*", - "https://*.epam.com/*" - ], + "permissions": ["tabs", "webRequest", "webRequestBlocking", "activeTab", "storage", "*://*/*"], "browser_action": { "default_icon": { "16": "default-logo.png",