Skip to content
This repository was archived by the owner on Jul 19, 2019. It is now read-only.

CORS permissive example server #118

Closed
wants to merge 4 commits into from
Closed

CORS permissive example server #118

wants to merge 4 commits into from

Conversation

MaxBittker
Copy link
Contributor

When following this tutorial, specifics about the different ways to set up ports/webpack/file serving/etc should tend towards "just working" and allow people to not get derailed. This PR sets the node.js example server to use lightweight middle-ware which sets HTTP headers to allow cross-origin requests.
Anecdotally, I lost a chunk of time debugging this problem when I was running the comment api server on ::3000, and webpack-dev-server on ::8080. Could be worth setting the other servers to do the same.
Thanks for this resource!

Prevents confusion and allows people to use different dev set-ups for development, like webpack-dev-server
@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks!

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@zpao
Copy link
Member

zpao commented Jan 24, 2016

Do you know which header needed to be set? I think I'd rather we just set it explicitly, making it easier to update all the servers at once.

Typically I'd say meh about this whole PR since you've obviously stepped outside this tutorial to use webpack, but it's common enough these days and minimal effort so it's fine.

@zpao
Copy link
Member

zpao commented Jan 26, 2016

Closing since #120 exists.

@zpao zpao closed this Jan 26, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants