apiaxle/apiaxle — pull request #58 by fillup (2014-06-25 13:39:13+00:00)
Title: Adding support for basic CORS: Cross-Origin Resource Sharing

Added boolean attribute to ApiFactory model ```corsEnabled```. When set to true, the proxy will add the following headers to all responses in order to support CORS, http://www.w3.org/TR/cors/.

```
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS, PATCH, HEAD
Access-Control-Allow-Headers: Origin, Accept, Content-Type, X-Requested-With, X-CSRF-Token
Access-Control-Expose-Headers: content-type, content-length, X-ApiaxleProxy-Qps-Left, X-ApiaxleProxy-Qpd-Left
```

Unit tests also added to test enabled/disabled states.