add trust proxy
This commit is contained in:
parent
d5540fed47
commit
8f99dbfcc3
|
@ -2,6 +2,7 @@ APP_PORT=8000
|
||||||
APP_DEBUG=true
|
APP_DEBUG=true
|
||||||
# 32-byte base64 string
|
# 32-byte base64 string
|
||||||
APP_KEY=
|
APP_KEY=
|
||||||
|
TRUST_PROXY=::ffff:10.8.0.1
|
||||||
|
|
||||||
DB_PORT=5432
|
DB_PORT=5432
|
||||||
DB_HOSTNAME=db
|
DB_HOSTNAME=db
|
||||||
|
|
2
index.js
2
index.js
|
@ -15,6 +15,8 @@ const bodyparser = require('body-parser');
|
||||||
|
|
||||||
const { APP_PORT } = process.env;
|
const { APP_PORT } = process.env;
|
||||||
|
|
||||||
|
app.set('trust proxy', process.env.TRUST_PROXY);
|
||||||
|
|
||||||
app.use(bodyparser.json());
|
app.use(bodyparser.json());
|
||||||
app.use(bodyparser.urlencoded({ extended: true }));
|
app.use(bodyparser.urlencoded({ extended: true }));
|
||||||
app.use(require('./middleware'));
|
app.use(require('./middleware'));
|
||||||
|
|
Loading…
Reference in New Issue