From b35a6f5ffb575d062663d2ddb47eec04021a8639 Mon Sep 17 00:00:00 2001 From: Rob Wu Date: Tue, 23 Jul 2013 21:44:41 +0200 Subject: [PATCH] Redirect URL in statusText Android's stock browser (and Webview) does not recognize the Access-Control-Expose-headers response header. Use the status text field to pass through this information. Updated demo and documentation. --- README.md | 12 +++++++++--- demo.html | 12 +++++++----- lib/cors-anywhere.js | 7 ++++++- lib/help.txt | 5 ++++- 4 files changed, 26 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index e7a7062..ce9d67d 100644 --- a/README.md +++ b/README.md @@ -41,12 +41,18 @@ Request examples: Live examples: -* http://cors-anywhere.herokuapp.com/ -* http://rob.lekensteyn.nl/cors-anywhere.html - This demo shows how to use the API. +* https://cors-anywhere.herokuapp.com/ +* https://robwu.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 +### Client + +Learn how to use the API in a web app by viewing the source code of [demo.html](demo.html) and reading [lib/help.txt](lib/help.txt). + +### Server + The module exports two properties: `getHandler` and `createServer`. * `getHandler(options)` returns a handler which implements the routing logic. @@ -71,7 +77,7 @@ The following options are recognized by both methods: ## License -Copyright (C) 2013 Rob W +Copyright (C) 2013 Rob Wu Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/demo.html b/demo.html index 194df67..7c69de0 100644 --- a/demo.html +++ b/demo.html @@ -48,7 +48,7 @@ textarea {
CORS Anywhere demo • GithubLive server.