From 26a5c47438b029043dd339c6a74de9ee5df7a9bf Mon Sep 17 00:00:00 2001 From: Max Korsunov Date: Mon, 7 Oct 2024 17:45:20 +0200 Subject: [PATCH] fix: allow http for production prax too --- apps/extension/src/senders/validate.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/apps/extension/src/senders/validate.ts b/apps/extension/src/senders/validate.ts index ddf3cbd2..eb882ec8 100644 --- a/apps/extension/src/senders/validate.ts +++ b/apps/extension/src/senders/validate.ts @@ -35,12 +35,7 @@ export const assertValidSender = (sender?: chrome.runtime.MessageSender) => { throw new Error('Sender origin is invalid'); } - if ( - !( - parsedOrigin.protocol in ValidProtocol || - (globalThis.__DEV__ && isHttpLocalhost(parsedOrigin)) - ) - ) { + if (!(parsedOrigin.protocol in ValidProtocol || isHttpLocalhost(parsedOrigin))) { throw new Error(`Sender protocol is not ${Object.values(ValidProtocol).join(',')}`); }