We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 72efaab commit 1cf4359Copy full SHA for 1cf4359
bin/webpack-dev-server.js
@@ -204,6 +204,11 @@ yargs.options({
204
default: "localhost",
205
describe: "The hostname/ip address the server will bind to",
206
group: CONNECTION_GROUP
207
+ },
208
+ "allowed-hosts": {
209
+ type: "string",
210
+ describe: "A comma-delimited string of hosts that are allowed to access the dev server",
211
+ group: CONNECTION_GROUP
212
}
213
});
214
@@ -233,6 +238,9 @@ function processOptions(wpOpt) {
233
238
if(argv.host !== "localhost" || !options.host)
234
239
options.host = argv.host;
235
240
241
+ if(argv["allowed-hosts"])
242
+ options.allowedHosts = argv["allowed-hosts"].split(",");
243
+
236
244
if(argv.public)
237
245
options.public = argv.public;
246
0 commit comments