add trust proxy

This commit is contained in:
b1ek 2023-03-12 12:17:24 +10:00
parent d5540fed47
commit 8f99dbfcc3
Signed by: blek
GPG Key ID: 14546221E3595D0C
2 changed files with 3 additions and 0 deletions

View File

@ -2,6 +2,7 @@ APP_PORT=8000
APP_DEBUG=true
# 32-byte base64 string
APP_KEY=
TRUST_PROXY=::ffff:10.8.0.1
DB_PORT=5432
DB_HOSTNAME=db

View File

@ -15,6 +15,8 @@ const bodyparser = require('body-parser');
const { APP_PORT } = process.env;
app.set('trust proxy', process.env.TRUST_PROXY);
app.use(bodyparser.json());
app.use(bodyparser.urlencoded({ extended: true }));
app.use(require('./middleware'));