Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable CORS #30

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

enable CORS #30

wants to merge 2 commits into from

Conversation

Hagith
Copy link
Collaborator

@Hagith Hagith commented Oct 3, 2016

No description provided.

Copy link

@Cosaquee Cosaquee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good !

@steve-jansen
Copy link
Owner

Apologies for getting to this late. Can this be tested?

According to http-party/node-http-proxy#382 (comment), the proxyRes event cannot modify the response.

@steve-jansen
Copy link
Owner

@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 😄

@Hagith
Copy link
Collaborator Author

Hagith commented Oct 27, 2016

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-Headers and Access-Control-Allow-Methods
  • will cover this case in spec

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants