Commit 48ba4619d04ded0617eea07dbdd3be6f251849aa
1 parent
23bee92dd5
Exists in
master
Trust proxy by config.partner.callback.trust_proxy
Showing 2 changed files with 9 additions and 0 deletions Side-by-side Diff
config.sample.json
lib/callback/index.js
... | ... | @@ -26,6 +26,14 @@ if (!listenPort) { |
26 | 26 | process.exit(1); |
27 | 27 | } |
28 | 28 | |
29 | +if (config.partner && config.partner.callback && config.partner.callback.trust_proxy) { | |
30 | + logger.verbose(`${MODULE_NAME} 9774C2DB: Trusting proxy`, { | |
31 | + trusted: config.partner.callback.trust_proxy, | |
32 | + }); | |
33 | + | |
34 | + app.set('trust proxy', config.partner.callback.trust_proxy); | |
35 | +} | |
36 | + | |
29 | 37 | app.use((req, res, next) => { |
30 | 38 | res.locals.xid = uniqid(); |
31 | 39 | next(); |