commit 2ec78cf9bb483e63beb61fe71cc76204f0e82e6a Author: David Fifield david@bamsoftware.com Date: Mon Mar 12 01:21:51 2012 -0700
Send "Access-Control-Allow-Origin: *" in facilitator responses to proxies.
This allows XMLHttpRequest to make requests across domains. --- facilitator.py | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/facilitator.py b/facilitator.py index ef0cb48..f028ae3 100755 --- a/facilitator.py +++ b/facilitator.py @@ -298,6 +298,8 @@ class Handler(BaseHTTPServer.BaseHTTPRequestHandler): self.send_response(200) self.send_header("Content-Type", "x-www-form-urlencoded") self.send_header("Cache-Control", "no-cache") + # Allow XMLHttpRequest from any domain. http://www.w3.org/TR/cors/. + self.send_header("Access-Control-Allow-Origin", "*") self.end_headers()
data = {}