diff options
author | Yamagishi Kazutoshi <ykzts@desire.sh> | 2022-04-19 16:11:58 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-19 08:11:58 +0100 |
commit | 5781d1db841ff7f81301cd28acecc5331a68d97e (patch) | |
tree | 2fdbc4c084b0786c3e87f0ac14ddb6190a23966a /streaming | |
parent | 50a088fd77d46110776789e13ec8eb27188f5f9d (diff) |
Fix parsing `TRUSTED_PROXY_IP` (#18051)
Diffstat (limited to 'streaming')
-rw-r--r-- | streaming/index.js | 2 |
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); |