{"action":"created","issue":{"url":"https://api.github.com/repos/webpack/webpack-dev-server/issues/277","repository_url":"https://api.github.com/repos/webpack/webpack-dev-server","labels_url":"https://api.github.com/repos/webpack/webpack-dev-server/issues/277/labels{/name}","comments_url":"https://api.github.com/repos/webpack/webpack-dev-server/issues/277/comments","events_url":"https://api.github.com/repos/webpack/webpack-dev-server/issues/277/events","html_url":"https://github.com/webpack/webpack-dev-server/issues/277","id":107692113,"number":277,"title":"CORS Access-Control-Allow-Origin problem with v1.11.0","user":{"login":"dlong500","id":430481,"avatar_url":"https://avatars.githubusercontent.com/u/430481?v=3","gravatar_id":"","url":"https://api.github.com/users/dlong500","html_url":"https://github.com/dlong500","followers_url":"https://api.github.com/users/dlong500/followers","following_url":"https://api.github.com/users/dlong500/following{/other_user}","gists_url":"https://api.github.com/users/dlong500/gists{/gist_id}","starred_url":"https://api.github.com/users/dlong500/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlong500/subscriptions","organizations_url":"https://api.github.com/users/dlong500/orgs","repos_url":"https://api.github.com/users/dlong500/repos","events_url":"https://api.github.com/users/dlong500/events{/privacy}","received_events_url":"https://api.github.com/users/dlong500/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2015-09-22T11:06:55Z","updated_at":"2016-06-24T12:59:22Z","closed_at":null,"body":"Upgrading to webpack-dev-server 1.11.0 from 1.10.1 produces the output shown in the screenshot with errors due to missing or improper CORS headers.  Rolling back to v1.10.1 eliminates the errors.  I haven't changed any other configuration.\r\n\r\n![screenshot-2015-09-22-06 56 53](https://cloud.githubusercontent.com/assets/430481/10016810/8c028a7a-60f7-11e5-9a7a-b0c62d2e16b9.png)\r\n"},"comment":{"url":"https://api.github.com/repos/webpack/webpack-dev-server/issues/comments/228338892","html_url":"https://github.com/webpack/webpack-dev-server/issues/277#issuecomment-228338892","issue_url":"https://api.github.com/repos/webpack/webpack-dev-server/issues/277","id":228338892,"user":{"login":"tonyqian66","id":20115934,"avatar_url":"https://avatars.githubusercontent.com/u/20115934?v=3","gravatar_id":"","url":"https://api.github.com/users/tonyqian66","html_url":"https://github.com/tonyqian66","followers_url":"https://api.github.com/users/tonyqian66/followers","following_url":"https://api.github.com/users/tonyqian66/following{/other_user}","gists_url":"https://api.github.com/users/tonyqian66/gists{/gist_id}","starred_url":"https://api.github.com/users/tonyqian66/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tonyqian66/subscriptions","organizations_url":"https://api.github.com/users/tonyqian66/orgs","repos_url":"https://api.github.com/users/tonyqian66/repos","events_url":"https://api.github.com/users/tonyqian66/events{/privacy}","received_events_url":"https://api.github.com/users/tonyqian66/received_events","type":"User","site_admin":false},"created_at":"2016-06-24T12:59:22Z","updated_at":"2016-06-24T12:59:22Z","body":"Davison,\n\n\nReally appreciate your prompt reply.\n\n\nTony\n\n\n________________________________\nFrom: Davison Long <notifications@github.com>\nSent: Thursday, June 23, 2016 5:03 PM\nTo: webpack/webpack-dev-server\nCc: tonyqian66; Mention\nSubject: Re: [webpack/webpack-dev-server] CORS Access-Control-Allow-Origin problem with v1.11.0 (#277)\n\n\n@tonyqian66<https://github.com/tonyqian66> To be honest, it's been a while since I used this configuration because I switched to invoking webpack middleware in the main server file using hapi-webpack-plugin (I currently use hapi as my main server, but there are also webpack middleware plugins for express). Doing it that way really simplifies the whole webpack-dev-server implementation in my experience.\n\nWhat I was previously doing was invoking webpack-dev-server from a gulp task.\n\nSo, for example, if I required webpack-dev-server in the gulpfile like so:\n\nvar WebpackDevServer = require('webpack-dev-server');\n\nThen I might have a task configured like this:\n\ngulp.task('webpack-watch', function(done) {\n  new WebpackDevServer(webpack(frontendConfig), {\n    publicPath: \"http://localhost:3000/public/build/js/\",\n    headers: { \"Access-Control-Allow-Origin\": \"http://localhost:4000\", \"Access-Control-Allow-Credentials\": \"true\" },\n    hot: true,\n    stats: outputOptions\n  }).listen(3000, 'localhost', function (err, result) {\n    if(err) {\n      console.log(err);\n    }\n    else {\n      console.log('webpack dev server listening at localhost:3000');\n    }\n  });\n});\n\n-\nYou are receiving this because you were mentioned.\nReply to this email directly, view it on GitHub<https://github.com/webpack/webpack-dev-server/issues/277#issuecomment-228183029>, or mute the thread<https://github.com/notifications/unsubscribe/ATLx3pkdD3kmtNBIE9ripbbsgc8qzH6Zks5qOvSUgaJpZM4GBhvJ>.\n"}}
{"actor":{"display_login":"tonyqian66"}}