A simple dev HTTP/HTTPS proxy for replacing CORS headers.
- CORS header replacement
- Host mapping with named placeholders
- HTTPS support with auto-generated certificates
- Response mocking
- Script handler (Lua with a JSON module)
- HTTP/HTTPS proxy support
- Static file serving
- Response caching
- Request rewriting
- HAR traffic recording
The full documentation is on the wiki.
Homebrew (macOS, Linux)
brew install evg4b/tap/uncorsScoop (Windows)
scoop bucket add evg4b https://github.com/evg4b/scoop-bucket.git
scoop install evg4b/uncorsnpm (cross-platform)
# Run without installing
npx -y uncors --from 'http://localhost:8080' --to 'https://github.com'
# Or add it to your project
npm install uncors --save-dev
# yarn add uncors --dev
# pnpm add -D uncorsDocker (cross-platform)
docker run -p 80:80 evg4b/uncors --interactive=false --from 'http://local.github.com' --to 'https://github.com'Stew (cross-platform)
stew install evg4b/uncorsOther options, including prebuilt binaries and building from source, are described on the Installation wiki page.
Start a proxy from http://localhost:8080 to https://github.com:
uncors --from 'http://localhost:8080' --to 'https://github.com'For larger setups, put the mappings in a YAML file and run
uncors --config .uncors.yaml. The
Configuration wiki page
describes every option.
Caution
Rewriting CORS headers weakens browser security. UNCORS is meant for local development and testing. Do not run it in production or expose it as a remote proxy. It has not had a security review.