about summary refs log tree commit diff
path: root/streaming
diff options
context:
space:
mode:
authorYamagishi Kazutoshi <ykzts@desire.sh>2022-04-19 16:11:58 +0900
committerGitHub <noreply@github.com>2022-04-19 08:11:58 +0100
commit5781d1db841ff7f81301cd28acecc5331a68d97e (patch)
tree2fdbc4c084b0786c3e87f0ac14ddb6190a23966a /streaming
parent50a088fd77d46110776789e13ec8eb27188f5f9d (diff)
Fix parsing `TRUSTED_PROXY_IP` (#18051)
Diffstat (limited to 'streaming')
-rw-r--r--streaming/index.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/streaming/index.js b/streaming/index.js
index d6b445a91..6935c4764 100644
--- a/streaming/index.js
+++ b/streaming/index.js
@@ -146,7 +146,7 @@ const startWorker = async (workerId) => {
 
   const app = express();
 
-  app.set('trusted proxy', process.env.TRUSTED_PROXY_IP || 'loopback,uniquelocal');
+  app.set('trust proxy', process.env.TRUSTED_PROXY_IP ? process.env.TRUSTED_PROXY_IP.split(/(?:\s*,\s*|\s+)/) : 'loopback,uniquelocal');
 
   const pgPool = new pg.Pool(Object.assign(pgConfigs[env], dbUrlToConfig(process.env.DATABASE_URL)));
   const server = http.createServer(app);