From 968f8439b04dc27bfb14e230e7d19a109db90f09 Mon Sep 17 00:00:00 2001 From: Rob W Date: Fri, 4 Jan 2013 22:55:16 +0100 Subject: [PATCH] Added demo; Add original status at 333 redirects --- demo.html | 130 +++++++++++++++++++++++++++++++++++++++++++ lib/cors-anywhere.js | 2 +- 2 files changed, 131 insertions(+), 1 deletion(-) create mode 100644 demo.html diff --git a/demo.html b/demo.html new file mode 100644 index 0000000..df91879 --- /dev/null +++ b/demo.html @@ -0,0 +1,130 @@ + + + + +Demo of CORS Anywhere + + + + +
+ CORS Anywhere demo • GithubLive server. + + + +
+
+ +
+ + + + diff --git a/lib/cors-anywhere.js b/lib/cors-anywhere.js index 84af7e1..4fb6dad 100644 --- a/lib/cors-anywhere.js +++ b/lib/cors-anywhere.js @@ -91,7 +91,7 @@ function proxyRequest(req, res, proxy, full_url, proxyOptions) { } // Don't use 301 or 302 because browsers may cancel the request (observed in Chrome with a custom request header) statusCode = 333; - reasonPhrase = 'Redirect'; + reasonPhrase = 'Redirect ' + statusCode; } // Don't slip through cookies