enable CORS
Apologies for getting to this late. Can this be tested?
According to https://github.com/nodejitsu/node-http-proxy/issues/382#issuecomment-14825372, the proxyRes event cannot modify the response.
@Hagith @Cosaquee I've added you as collaborators to this repo. Merge away if you think it will help the community.
I could use help managing PRs, and appreciate your help with json-proxy 😄
Thank you for review and greatly appreciate for adding me as collaborator.
Answer you mentioned is about modifying response body - yes, it's not possible, a specially for https. But we need to change response headers to allow CORS, and from our experience it's possible and it's working :)
I will add 2 more commit to this PR:
- we tested this in the field, and for fully functional CORS, we need to add two more headers:
Access-Control-Allow-HeadersandAccess-Control-Allow-Methods - will cover this case in spec