forked from gr2m/CORS-Proxy
-
Notifications
You must be signed in to change notification settings - Fork 3
/
README
28 lines (18 loc) · 841 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
REQUIREMENTS
* node.js in order to start the proxy locally
* some entries in your hosts file, like
127.0.0.1 proxy.example.com # proxy for example.com
127.0.0.1 subdomain.proxy.example.com # proxy for subdomain.example.com
USAGE
1. Start the proxy
$ node server.js
2. If you want to send CORS requests to »example.com/foo/bar.json«, use »proxy.example.com:8080/foo/bar.json«
3. That's it
CUSTOM HEADERS & HOST
In case you need to be able to send custome headers, pass them as SPACE-separated argument list:
$ node server.js X-FunkyappApiKey X-SecretStuff
If you need to specify a custom Domain, just add id as another argument, like:
$ node server.js X-FunkyappApiKey X-SecretStuff custom.domain.com
CORS?
* http://www.w3.org/TR/cors/
* http://hacks.mozilla.org/2009/07/cross-site-xmlhttprequest-with-cors/