https://github.com/soarez/turbo-cors
a hack to bypass preflight requests
https://github.com/soarez/turbo-cors
Last synced: 5 days ago
JSON representation
a hack to bypass preflight requests
- Host: GitHub
- URL: https://github.com/soarez/turbo-cors
- Owner: soarez
- Created: 2014-01-30T00:07:15.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2014-01-30T10:05:24.000Z (over 12 years ago)
- Last Synced: 2026-05-02T10:36:58.744Z (about 2 months ago)
- Language: JavaScript
- Homepage: http://soarez.github.io/turbo-cors/
- Size: 133 KB
- Stars: 8
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# turbo-cors
> Because currently CORS sends twice more requests than needed, which makes it slower than alternative cross domain transports & overloads API with pointless payloads.
Inspired by [blog](http://homakov.blogspot.pt/2014/01/how-to-use-cors-without-preflights.html) post from [@homakov](https://twitter.com/homakov/status/428370724672110592).
The basic idea is to bypass the CORS preflight request by putting the actual method and the extra headers on the `Accept` header.
## usage
1. clone the repo
2. cd into it, `npm install`
3. `node server`
4. point your browser to `http://localhost:8000`