@@ -90,7 +90,7 @@ CORS Issues
9090-----------
9191
9292If you experience issues related to CORS (Cross Origin Resource Sharing), set
93- the `` firewall `` option:
93+ the following option:
9494
9595.. code-block :: javascript
9696
@@ -101,11 +101,13 @@ the ``firewall`` option:
101101 // ...
102102
103103 .configureDevServerOptions (options => {
104- options .firewall = false ;
104+ options .allowedHosts = ' all' ;
105+ // in older Webpack Dev Server versions, use this option instead:
106+ // options.firewall = false;
105107 })
106108
107- Beware that ` it's not recommended to disable the firewall `_ in general, but
108- here it's required to solve the CORS issue.
109+ Beware that this is not a recommended security practice in general, but here
110+ it's required to solve the CORS issue.
109111
110112Hot Module Replacement HMR
111113--------------------------
@@ -123,5 +125,4 @@ your page. HMR works automatically with CSS (as long as you're using the
123125 CSS. That is no longer needed.
124126
125127.. _`webpack-dev-server` : https://webpack.js.org/configuration/dev-server/
126- .. _`it's not recommended to disable the firewall` : https://webpack.js.org/configuration/dev-server/#devserverdisablehostcheck
127128.. _`4.0 CHANGELOG` : https://github.com/webpack/webpack-dev-server/blob/master/CHANGELOG.md#400-beta0-2020-11-27
0 commit comments