After I read this article, what I understand is that in order to allow cross-domain ajax calls, I have to set the server response to be Access-Control-Allow-Origin:
Access-Control-Allow-Origin
, not Access - Control - Allow - Origin
self.response.headers.add_header(str)
is valid, maybe self.response.headers.add_header(key, name)
?*
domain doesn't work (at least not for all browsers). You have to use exact domain, full name, with protocol. Like http://example.com
Origin
header, for ajax call. I'm not sure how to configure raw xhr
, but I guess that it's made by browser itself, and you can't modify this value. Anyway, your domain not example