mirror of
https://github.com/d0zingcat/cors-anywhere.git
synced 2026-05-13 15:09:25 +00:00
29 lines
1.2 KiB
Plaintext
29 lines
1.2 KiB
Plaintext
This API enables cross-origin requests to anywhere.
|
|
|
|
Usage:
|
|
|
|
/ Shows help
|
|
/iscorsneeded This is the only resource on this host which is served without CORS headers.
|
|
/<url> Create a request to <url>, and includes CORS headers in the response.
|
|
|
|
If the protocol is omitted, it defaults to http (https if port 443 is specified).
|
|
|
|
Cookies are disabled and stripped from requests.
|
|
|
|
Redirects are automatically followed. For debugging purposes, each followed redirect results
|
|
in the addition of a X-CORS-Redirect-n header, where n starts at 1. This header is not
|
|
accessible by the XMLHttpRequest API.
|
|
|
|
The final request URL is available in the X-Request-URL response header. Non-existence of
|
|
this header implies that the requested URL was not recognized.
|
|
|
|
|
|
To prevent the use of the proxy for casual browsing, the API requires either the Origin
|
|
or the X-Requested-With header to be set. To avoid unnecessary preflight (OPTIONS) requests,
|
|
it's recommended to not manually set these headers in your code.
|
|
|
|
|
|
Demo : https://robwu.nl/cors-anywhere.html
|
|
Source code : https://github.com/Rob--W/cors-anywhere/
|
|
Documentation : https://github.com/Rob--W/cors-anywhere/#documentation
|