Skip to content

Commit

Permalink
Add TRUSTED_PROXIES variable
Browse files Browse the repository at this point in the history
  • Loading branch information
guimard committed Apr 17, 2024
1 parent 6726544 commit b81532f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ if (process.argv[2] === 'generate') {
} else {
const tomServer = new TomServer(conf)
const app = express()
const trustProxy = process.env.TRUSTED_PROXIES ? process.env.TRUSTED_PROXIES.split(/\s+/) : []
if (trustProxy.length>0) {
app.set('trust proxy', ...trustProxy)
}
const promises = [tomServer.ready]

if (process.env.CROWDSEC_URI) {
Expand Down

0 comments on commit b81532f

Please sign in to comment.