Hi,
I am getting the following error while running the webpack dev server,
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access.
I have added all the combination of header, proxy. But no luck.
My devserver config look like
devServer: {
contentBase: './',
header: {
'Access-Control-Allow-Origin': 'http://localhost:8080',
'Access-Control-Allow-Methods': 'GET,OPTIONS,HEAD,PUT,POST,DELETE,PATCH',
'Access-Control-Allow-Headers': 'Origin, Content-Type, Accept, Authorization, X-Request-With',
'Access-Control-Allow-Credentials': 'true'
}
}
It's headers, not header.
Oops typo error, thanks Kluskens .
Hi, I'm having this issue with webpack 2.4.2 and setting the headers didn't help. What else could it be?
Edit: weird thing is that I see the error in the console, but I also see the response correctly in the network tab:


I have had the same issues
@Zadvornyi please don't add "me too" replies to an issue. instead, please use the reaction buttons to add a thumbs up to a comment you're agreeing with, or the original post.
Most helpful comment
I have had the same issues