File tree 1 file changed +4
-5
lines changed
1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ Fix "Invalid Host header" Issue
96
96
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
97
97
98
98
Webpack will respond ``Invalid Host header `` when trying to access files from
99
- the dev-server. To fix this, set the ``firewall `` option:
99
+ the dev-server. To fix this, set the ``allowedHosts `` option:
100
100
101
101
.. code-block :: javascript
102
102
@@ -107,16 +107,15 @@ the dev-server. To fix this, set the ``firewall`` option:
107
107
// ...
108
108
109
109
.configureDevServerOptions (options => {
110
- options .firewall = false ;
110
+ options .allowedHosts = all ;
111
111
})
112
112
113
113
.. caution ::
114
114
115
- Beware that `it's not recommended to disable the firewall `_ in general, but
116
- here it's required to solve the issue when using Encore in a virtual machine.
115
+ Beware that `it's not recommended to set allowedHosts to all `_. Read the dedicated doc to select the value for your environment.
117
116
118
117
.. _`VirtualBox` : https://www.virtualbox.org/
119
118
.. _`VMWare` : https://www.vmware.com
120
119
.. _`NFS` : https://en.wikipedia.org/wiki/Network_File_System
121
120
.. _`polling` : https://webpack.js.org/configuration/watch/#watchoptionspoll
122
- .. _`it's not recommended to disable the firewall ` : https://webpack.js.org/configuration/dev-server/#devserverdisablehostcheck
121
+ .. _`it's not recommended to set allowedHosts to all ` : https://webpack.js.org/configuration/dev-server/#devserverallowedhosts
You can’t perform that action at this time.
0 commit comments