diff --git a/lib/Server.js b/lib/Server.js index b1ef0125a5..5a7d456b5f 100644 --- a/lib/Server.js +++ b/lib/Server.js @@ -424,8 +424,8 @@ class Server { } // CLI pass options as array, we should normalize them else if ( - Array.isArray(this.options.allowedHosts) && - this.options.allowedHosts.includes("all") + Array.isArray(options.allowedHosts) && + options.allowedHosts.includes("all") ) { options.allowedHosts = "all"; }