mirror of
https://github.com/d0zingcat/cors-anywhere.git
synced 2026-05-13 15:09:25 +00:00
Updated README and description
This commit is contained in:
@@ -6,6 +6,8 @@ the protocol defaults to "https".
|
||||
|
||||
This package does not put any restrictions on the http methods or headers, except for
|
||||
cookies. Requesting [user credentials](http://www.w3.org/TR/cors/#user-credentials) is disallowed.
|
||||
The app can be configured to require a header for proxying a request, for example to avoid
|
||||
a direct visit from the browser.
|
||||
|
||||
Redirects are not automatically followed. Instead, the server replies with http status code 333 and
|
||||
includes an absolute URL in the `Location` response header.
|
||||
@@ -33,14 +35,15 @@ Request examples:
|
||||
|
||||
* `http://localhost:8080/http://google.com/` - Google.com with CORS headers
|
||||
* `http://localhost:8080/google.com` - Same as previous.
|
||||
* `http://localhost:8080/google.com:443` - Proxies https://google.com/
|
||||
* `http://localhost:8080/google.com:443` - Proxies `https://google.com/`
|
||||
* `http://localhost:8080/` - Shows usage text, as defined in `libs/help.txt`
|
||||
* `http://localhost:8080/favicon.ico` - Replies 404 Not found
|
||||
|
||||
Live examples:
|
||||
|
||||
* http://cors-anywhere.herokuapp.com/
|
||||
* http://rob.lekensteyn.nl/cors-anywhere.html
|
||||
* http://rob.lekensteyn.nl/cors-anywhere.html - This demo shows how to use the API.
|
||||
Includes a redirect handler (including loop detection) and shows that the POST also works.
|
||||
|
||||
## Documentation
|
||||
|
||||
@@ -51,7 +54,7 @@ The module exports two properties: `getHandler` and `createServer`.
|
||||
* `createServer(options)` creates a server with the default handler.
|
||||
|
||||
The following options are recognized by both methods:
|
||||
* string `requireHeader`` - If set, the request must include this header or the API will refuse to proxy.
|
||||
* string `requireHeader` - If set, the request must include this header or the API will refuse to proxy.
|
||||
Recommended if you want to prevent users from using the proxy for browsing. Example: `X-Requested-With`
|
||||
* array of lowercase strings `removeHeaders` - Exclude certain headers from being included in the request.
|
||||
Example: `["cookie"]`
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "cors-anywhere",
|
||||
"version": "0.1.1",
|
||||
"description": "Adds CORS headers to any request by acting as a http-proxy. The URL is parsed from the path.",
|
||||
"description": "CORS Anywhere is a reverse proxy which adds CORS headers to the proxied request. Request URL is taken from the path",
|
||||
"license": "MIT",
|
||||
"author": "Rob W <gwnRob@gmail.com>",
|
||||
"repository": {
|
||||
|
||||
Reference in New Issue
Block a user