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.inkis retained. Public documentation pages move towireflip.forth.ink, with redirects preserving paths and query parameters. - The hosted
/message/bridge stays oncors.forth.inkfor 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
- Update the browser extension to Wireflip 2.0 using the same store listing. Check that it is enabled.
- Replace the npm dependency:
npm uninstall cors-unlocker
npm install wireflip
- 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
}
});
}
- Update calls using this mapping:
| Old API | New 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.
Applications using wireflip@0.2.0 should update to 2.1.0. The old local SDK waits only 5 seconds for some changes, so the new extension returns an immediate upgrade error when a change needs confirmation. It never leaves an approval window that can apply a change after the application reports a timeout. Read-only calls remain available; manually trusted sites can continue ordinary changes. The older cors-unlocker hosted bridge retains its separate confirmation flow.
Existing manual or older unowned CORS rules remain under your control in Wireflip → Rules. To let a website create a new owned rule, delete its old CORS rule there, return to the website and retry. Trusting a website does not give it control over these existing rules.