Menu

Migrating from CORS Unlocker

CORS Unlocker is now Wireflip. Existing integrations using cors-unlocker@0.1.0 are retained; changing the product name does not require you to immediately rewrite your application.

What stays available

  • The old hostname cors.forth.ink is retained. Public documentation pages move to wireflip.forth.ink, with redirects preserving paths and query parameters.
  • The hosted /message/ bridge stays on cors.forth.ink for the published SDK. Keep that address in existing integrations; replacing it with the new hostname is not an SDK upgrade.
  • The extension keeps its existing IDs. Updating the extension converts existing CORS settings automatically; reinstalling it or clearing settings is unnecessary.

No removal date for the old SDK bridge has been announced. Migration is optional. The old bridge keeps its original origin; a domain redirect is not an SDK upgrade.

When to upgrade

Use the new SDK for a packaged local bridge, browser capability detection and disabled rule drafts. It communicates directly with the installed extension rather than loading a hosted iframe.

The wireflip SDK works with Wireflip 2.0 for Chrome and Firefox. Update the extension before following the optional migration below.

Upgrade your application

  1. Update the browser extension to Wireflip 2.0 using the same store listing. Check that it is enabled.
  2. Replace the npm dependency:
npm uninstall cors-unlocker
npm install wireflip
  1. Replace hosted-bridge initialization with a local session:
import { intercept } from 'wireflip';

if (await intercept.isAvailable()) {
  const session = await intercept.connect();
  const status = await session.getStatus();
  console.log(status.cors);

  // Connect before the click; request the change directly from the handler
  enableCorsButton.addEventListener('click', async () => {
    try {
      await session.requestCors({
        credentials: false,
        reason: 'Preview staging API data',
      });
    } catch (error) {
      console.error(error); // Show cancellation or upgrade guidance in your UI
    }
  });
}
  1. Update calls using this mapping:
Old APINew API
isExtInstalled()intercept.isAvailable()
isEnabled()(await session.getStatus()).cors
enable(options)(await session.requestCors(options)).cors
disable()session.disableCors()
openExtOptions()session.openWorkspace()
openStorePage()intercept.openStorePage()

The old function names are also exported by wireflip to ease adoption, but use its new local bridge. They do not load the old hosted iframe.

Behavior changes to check

CORS requests through the new SDK require user confirmation and affect only the application’s actual page origin. Handle rejection or an unavailable extension in your UI; do not enable CORS silently during page load. SDK calls do not start a tab interception session. Rule drafts are disabled until the user reviews and enables them.

Test both CORS enabled and disabled, user cancellation, an unavailable extension, and any credentialed requests. Read the SDK documentation for capability differences between Chrome and Firefox.

Staying on the old SDK

Keep the existing package and hosted-bridge address. Do not redirect the iframe to another origin or change its extension ID. No application changes are required solely for the rename. If the bridge cannot load, report it through GitHub issues with the browser and extension version, without including credentials or private request data.

Website authorization in 2.1

Firefox 2.1.0 is available. Chrome 2.1.0 has been submitted for review; the public Chrome version remains 2.0.0. SDK 2.1.0 is available on npm. Capability-check new APIs because package availability does not mean an installed extension has updated. It adds extension-owned confirmation for website changes. Users can manually trust the exact site in Popup → Website control to skip ordinary prompts; access to login credentials still requires confirmation. Revoking trust restores prompts without disabling saved rules.

With the updated extension, sites using wireflip@0.2.0 can keep calling requestCors() from a user click. Its confirmation expires after 50 seconds, within the SDK’s 60-second timeout. Draft creation that requires confirmation still needs SDK 2.1.0 because the old client waits only five seconds.

Users can approve enabling their site’s existing CORS setting in place, including settings saved manually or with an older extension. A click can turn it off directly. The rule keeps its identity, group and ownership. General rule editing and deletion still require website ownership.