Add X-CORS-Redirect-# header for debugging

This commit is contained in:
Rob Wu
2013-08-28 20:50:46 +02:00
parent d7a6564574
commit 3bb98d6bea
2 changed files with 12 additions and 2 deletions

View File

@@ -10,8 +10,13 @@ If the protocol is omitted, it defaults to http (https if port 443 is specified)
Cookies are disabled and stripped from requests.
The requested URL is available in the X-Request-URL response header. Non-existence of this
header implies that the requested URL was not recognized.
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,