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

Proxying existing vhost #8

Closed
narehart opened this issue Aug 12, 2015 · 1 comment
Closed

Proxying existing vhost #8

narehart opened this issue Aug 12, 2015 · 1 comment

Comments

@narehart
Copy link

I'm trying to proxy a vhost through whm and I am getting errors about Access-Control-Allow-Origin on hot-update.json. Found this issue on react-hot-loader. Is there something I need to add to the whm entry?

entry: [
    'webpack/hot/dev-server',
    'webpack-hot-middleware/client?path=http://mywebsite.dev',
    './src/js/entries/app.jsx'
],
@glenjamin
Copy link
Collaborator

You might need to update whichever server is serving http://mywebsite.dev to include CORS headers.

As this module only provides middleware, it's up to the user to add CORS headers if needed into the middleware stack of the application. Adding it before adding the hot middleware should ensure that all relevant requests get the header. See https://github.com/expressjs/cors for more info.

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

No branches or pull requests

2 participants