https://github.com/kwhitley/itty-cors
Dead-simple CORS handling for any itty-router API (test with Cloudflare Workers, but works anywhere)!
https://github.com/kwhitley/itty-cors
Last synced: about 2 months ago
JSON representation
Dead-simple CORS handling for any itty-router API (test with Cloudflare Workers, but works anywhere)!
- Host: GitHub
- URL: https://github.com/kwhitley/itty-cors
- Owner: kwhitley
- License: mit
- Created: 2022-10-02T22:39:32.000Z (over 2 years ago)
- Default Branch: v0.x
- Last Pushed: 2024-04-01T17:43:41.000Z (about 1 year ago)
- Last Synced: 2025-04-27T17:02:01.793Z (about 2 months ago)
- Language: TypeScript
- Size: 78.1 KB
- Stars: 20
- Watchers: 2
- Forks: 4
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# 
[](https://npmjs.com/package/itty-cors)
[](https://bundlephobia.com/result?p=itty-cors)
[](https://github.com/kwhitley/itty-cors/actions/workflows/verify.yml)
[](https://coveralls.io/github/kwhitley/itty-cors?branch=v0.x)
[](https://npmjs.com/package/itty-cors)
[](https://github.com/kwhitley/itty-cors/issues)[](https://discord.com/channels/832353585802903572)
[](https://github.com/kwhitley/itty-cors)
[](https://www.twitter.com/kevinrwhitley)# Deprecation Notice
### _`itty-cors` has been fully deprecated in favor of [`itty-router/cors`](https://itty.dev/itty-router/cors)._This complete rewrite brings the following:
1. full support for industry-standard options (matches express.js)
2. far more control of matching/reflecting origins
3. true wildcard support
4. fixes a nasty race condition that could appear under heavy multi-user load
5. 20% smaller (we somehow shed over 100 bytes)
6. 100% test coverage, like anything in itty-router core### itty-router v5.x CORS Guide
https://itty.dev/itty-router/cors### v5.x Migration Guide
https://itty.dev/itty-router/migrations/v4-v5