Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

webpack: Pass --allowed-hosts as separate flags.

Aman Agrawal7972b0bd3057
diff --git a/tools/webpack b/tools/webpack
index b4a876fcc78..34d6153981c 100755
--- a/tools/webpack
+++ b/tools/webpack
@@ -73,7 +73,12 @@ def build_for_dev_server(host: str, port: str, minify: bool, disable_host_check:
if disable_host_check:
webpack_args.append("--allowed-hosts=all")
else:
- webpack_args.append(f"--allowed-hosts={host},.zulipdev.com,.zulipdev.org")
+ # webpack-dev-server's --allowed-hosts CLI flag does not split
+ # on commas; each host must be passed as a separate argument.
+ webpack_args.extend(
+ f"--allowed-hosts={allowed_host}"
+ for allowed_host in [host, ".zulipdev.com", ".zulipdev.org"]
+ )
# Tell webpack-dev-server to fall back to periodic polling on
# filesystems where inotify is known to be broken.