diff --git a/tools/run-dev.py b/tools/run-dev.py index 1e942f8abe..e8f4b38a9c 100755 --- a/tools/run-dev.py +++ b/tools/run-dev.py @@ -288,6 +288,8 @@ class CombineHandler(BaseWebsocketHandler): @web.asynchronous def prepare(self): # type: () -> None + if 'X-REAL-IP' not in self.request.headers: + self.request.headers['X-REAL-IP'] = self.request.remote_ip if self.request.headers.get("Upgrade", "").lower() == 'websocket': return super(CombineHandler, self).prepare() url = transform_url( diff --git a/tools/webpack.config.js b/tools/webpack.config.js index fa2387a5ba..eaee84380a 100644 --- a/tools/webpack.config.js +++ b/tools/webpack.config.js @@ -1,11 +1,11 @@ module.exports = { entry: [ - 'webpack-dev-server/client?http://127.0.0.1:9991/socket.io', + 'webpack-dev-server/client?http://0.0.0.0:9991/socket.io', './static/js/src/main.js', ], devtool: 'eval', output: { - publicPath: 'http://127.0.0.1:9991/webpack/', + publicPath: 'http://0.0.0.0:9991/webpack/', path: './static/js', filename: 'bundle.js', },