about summary refs log tree commit diff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/webpack/configuration.js2
-rw-r--r--config/webpack/development.server.js3
2 files changed, 3 insertions, 2 deletions
diff --git a/config/webpack/configuration.js b/config/webpack/configuration.js
index 922e8c517..2a54080cf 100644
--- a/config/webpack/configuration.js
+++ b/config/webpack/configuration.js
@@ -12,7 +12,7 @@ const devServer = safeLoad(readFileSync(join(configPath, 'development.server.yml
 
 // Compute public path based on environment and CDN_HOST in production
 const ifHasCDN = env.CDN_HOST !== undefined && env.NODE_ENV === 'production';
-const devServerUrl = `http://${devServer.host}:${devServer.port}/${paths.entry}/`;
+const devServerUrl = `http://${env.LOCAL_DOMAIN || devServer.host}:${devServer.port}/${paths.entry}/`;
 const publicUrl = ifHasCDN ? `${env.CDN_HOST}/${paths.entry}/` : `/${paths.entry}/`;
 const publicPath = env.NODE_ENV !== 'production' ? devServerUrl : publicUrl;
 
diff --git a/config/webpack/development.server.js b/config/webpack/development.server.js
index 296df1504..4e11df4cb 100644
--- a/config/webpack/development.server.js
+++ b/config/webpack/development.server.js
@@ -1,13 +1,14 @@
 // Note: You must restart bin/webpack-dev-server for changes to take effect
 
 const { resolve } = require('path');
+const { env } = require('process');
 const merge = require('webpack-merge');
 const devConfig = require('./development.js');
 const { devServer, publicPath, paths } = require('./configuration.js');
 
 module.exports = merge(devConfig, {
   devServer: {
-    host: devServer.host,
+    host: env.LOCAL_DOMAIN ? '0.0.0.0' : devServer.host,
     port: devServer.port,
     headers: { "Access-Control-Allow-Origin": "*" },
     compress: true,