π Instantly unlock CORS restrictions for seamless API testing and cross-origin development
- π One-Click CORS Unlock - Enable/disable CORS restrictions with a single click
- π― Smart Credentials Support - Automatically handles authentication headers
- β‘ Zero Configuration - Works out of the box, no setup required
- πͺΆ Lightweight & Fast - Minimal impact on browser performance
- π οΈ Developer-Friendly - Built by developers, for developers
- π¦ NPM Integration - Programmatic CORS management for your applications
- π Cross-Browser Support - Chrome, Firefox, and Edge compatible
- π Privacy-First - No data collection, works entirely locally
-
Install from Store:
-
Enable CORS:
- Click the CORS Unlocker icon in your browser toolbar
- Toggle CORS for the current tab
- Make your cross-origin requests without restrictions
npm install cors-unlockerimport { enable, disable, isExtInstalled } from 'cors-unlocker';
// Check if extension is installed
const installed = await isExtInstalled();
// Enable CORS for current page
await enable();
// Enable with credentials support
await enable({ credentials: true });
// Disable CORS
await disable();This is a monorepo containing multiple packages:
cors-unlocker/
βββ packages/
β βββ browser-extension/ # Browser extension (Chrome, Firefox, Edge)
β βββ npm/ # NPM package for developers
β βββ website/ # Documentation and demo website
βββ docs/ # Additional documentation
βββ README.md # This file
Cross-browser extension that enables CORS bypass functionality:
- Chrome/Edge: Uses
declarativeNetRequestAPI - Firefox: Content script bridge for external communication
- Features: Popup interface, settings page, tab-specific control
Lightweight JavaScript package for programmatic CORS management:
- Size: ~1.7KB gzipped
- Formats: ES modules and UMD
- TypeScript: Full type definitions included
- Browser Support: Chrome, Firefox, Edge
Documentation and demo site built with Astro:
- Live Demo: Interactive CORS testing interface
- Documentation: Complete API reference and guides
- Playground: Test the extension functionality
- Node.js 18+
- pnpm (recommended) or npm
# Clone the repository
git clone https://github.com/yourusername/cors-unlocker.git
cd cors-unlocker
# Install dependencies
pnpm install
# Start development servers
pnpm dev# Build all packages
pnpm build
# Build specific package (from root)
pnpm dev:extension # Extension development
pnpm dev:website # Website development
pnpm dev:cors-unlocker # NPM package development# Development
pnpm dev # Start all dev servers
pnpm dev:extension # Extension development only
pnpm dev:website # Website development only
pnpm dev:cors-unlocker # NPM package development
# Building
pnpm build # Build all packages// Perfect for testing APIs during development
await enable({ credentials: true });
const response = await fetch('https://api.example.com/data');// Seamless third-party service integration
await enable();
const result = await fetch('https://third-party-api.com/endpoint');// Include in your test setup
beforeEach(async () => {
if (await isExtInstalled()) {
await enable();
}
});- Local Operation: All functionality works entirely in your browser
- No Data Collection: We don't collect, store, or transmit any user data
- Tab-Specific: Only affects tabs where you explicitly enable CORS
- Open Source: Fully transparent and auditable code
- Secure by Default: Automatically disables when not needed
| Browser | Extension | NPM Package |
|---|---|---|
| Chrome | β | β |
| Firefox | β | β |
| Edge | β | β |
| Safari | β | β |
- Getting Started - Quick setup guide
- API Reference - Complete API documentation
- Examples - Common use cases and examples
- FAQ - Common questions and answers
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Vite and TypeScript
- UI components powered by React and Tailwind CSS
- Icons from Lucide
- Website built with Astro
- Documentation: cors.forth.ink
- Issues: GitHub Issues
- Discussions: GitHub Discussions
β Star this repository if CORS Unlocker helps your development workflow!
Made with β€οΈ by developers, for developers.