Skip to content

enable CORS#30

Open
Hagith wants to merge 2 commits into
steve-jansen:masterfrom
Hagith:pr-cors
Open

enable CORS#30
Hagith wants to merge 2 commits into
steve-jansen:masterfrom
Hagith:pr-cors

Conversation

@Hagith

@Hagith Hagith commented Oct 3, 2016

Copy link
Copy Markdown
Collaborator

No description provided.

@Cosaquee Cosaquee left a comment

Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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

Hagith commented Oct 27, 2016

Copy link
Copy Markdown
Collaborator Author

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