I am using as an environment, a Cloud9.io ubuntu VM Online IDE and I have reduced by troubleshooting this error to just running the app with Webpack dev server.
I l
The more secure option would be to add allowedHosts to your Webpack config like this:
module.exports = { devServer: { allowedHosts: [ 'host.com', 'subdomain.host.com', 'subdomain2.host.com', 'host2.com' ] } };
The array contains all allowed host, you can also specify subdomians. check out more here