diff --git a/src/index.js b/src/index.js index 452963bb61..18c30b90f9 100644 --- a/src/index.js +++ b/src/index.js @@ -101,7 +101,7 @@ class Payload { // If not initializing locally, set up HTTP routing if (!this.config.local) { this.express = options.express; - if (this.config.rateLimit?.trustProxy) this.express.set('trust proxy', 1); + if (this.config.rateLimit && this.config.rateLimit.trustProxy) this.express.set('trust proxy', 1); this.initAdmin();