From 4618a19c043aa505ed9ae42807ed8346879a80f7 Mon Sep 17 00:00:00 2001 From: whyour Date: Tue, 29 Aug 2023 21:50:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9C=AC=E5=9C=B0=E7=9B=91?= =?UTF-8?q?=E5=90=AC=20ip?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/loaders/express.ts | 2 +- back/schedule/client.ts | 2 +- back/schedule/health.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/back/loaders/express.ts b/back/loaders/express.ts index 7f1a06f2..1de92cd8 100644 --- a/back/loaders/express.ts +++ b/back/loaders/express.ts @@ -26,7 +26,7 @@ export default ({ app }: { app: Application }) => { app.use( '/api/public', createProxyMiddleware({ - target: `http://localhost:${config.publicPort}/api`, + target: `http://0.0.0.0:${config.publicPort}/api`, changeOrigin: true, pathRewrite: { '/api/public': '' }, logProvider: () => Logger diff --git a/back/schedule/client.ts b/back/schedule/client.ts index e9d04b77..ab70dba0 100644 --- a/back/schedule/client.ts +++ b/back/schedule/client.ts @@ -10,7 +10,7 @@ import config from '../config'; class Client { private client = new CronClient( - `localhost:${config.cronPort}`, + `0.0.0.0:${config.cronPort}`, credentials.createInsecure(), ); diff --git a/back/schedule/health.ts b/back/schedule/health.ts index bda0ec9b..9946034c 100644 --- a/back/schedule/health.ts +++ b/back/schedule/health.ts @@ -10,7 +10,7 @@ const check = async ( switch (call.request.service) { case 'cron': const res = await promiseExec( - `curl -s http://localhost:${config.port}/api/system`, + `curl -s http://0.0.0.0:${config.port}/api/system`, ); if (res.includes('200')) {