-
Notifications
You must be signed in to change notification settings - Fork 20
Description
Some browsers now support cross-site XMLHttpRequests. But for security purposes the server responding to those requests must implement an access control policy or the requests are blocked by the browser.
I think it would be very useful to be able to set up one ReverseHTTP server to use with various sites. To support this with cross-site Ajax, also called CORS, require implementing the access control protocol as described at https://developer.mozilla.org/En/HTTP_Access_Control.
Basically if a GET or POST request arrives with an 'Origin' header the server needs to include an 'Access-Control-Allow-Origin' header in its response. If an OPTIONS request arrives with an 'Origin' header, an 'Access-Control-Request-Method' header, and possibly an 'Access-Control-Request-Headers' the server needs to respond with 'Access-Control-Allow-Origin', 'Access-Control-Allow-Methods', and 'Access-Control-Allow-Headers' headers.