static-html-webpack-boilerplate icon indicating copy to clipboard operation
static-html-webpack-boilerplate copied to clipboard

Livereload CORS

Open allanesquina opened this issue 6 years ago • 0 comments

Hi, thanks for the project. After install the dependencies and start the app I got a Invalid Host/Origin header error which seems to belong to livereload feature, so I simply fixed that by setting this properties in devServer object on webpack.config.dev file.

   ...
    disableHostCheck: true,  
    headers: {
      "Access-Control-Allow-Origin": "*",
      "Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, PATCH, OPTIONS",
      "Access-Control-Allow-Headers": "X-Requested-With, content-type, Authorization"
    }
   ...

I didn't open any PR, it's just for register. Best! :+1:

allanesquina avatar Dec 23 '18 17:12 allanesquina