webpack serveur de dev de la SCRO problème

Je suis en utilisant webpack-dev-server v1.10.1 pour stimuler mon Redux projet et j'ai les options ci-dessous:

contentBase: `http://${config.HOST}:${config.PORT}`,
quiet: false,
noInfo: true,
hot: true,
inline: true,
lazy: false,
publicPath: configWebpack.output.publicPath,
headers: {"Access-Control-Allow-Origin": "*"},
stats: {colors: true}

Dans le JS, je suis en utilisant request de superagent pour générer un appel HTTP GET

request
          .get(config.APIHost + apiUrl)
          .set('Accept', 'application/json')
          .withCredentials()
          .end(function (err, res) {
                if (!err && res.body) {
                    disptach(() => {
                        return {
                            type: actionType || GET_DATA,
                            payload: {
                                response: res.body
                            }
                        }
                    });
                }
          });

Mais j'ai eu de la SCRO erreur:

XMLHttpRequest cannot load http://localhost:8000/api/getContentByType?category=all. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:5050' is therefore not allowed access

Toute suggestion pour résoudre ce problème? Merci beaucoup

OriginalL'auteur haohcraft | 2015-07-24