{"record":{"id":"824571c3e860fa0d","repo":"balderdashy/sails","slug":"e-http-bad-trustproxy","errorCode":"E_HTTP_BAD_TRUSTPROXY","errorMessage":"The `sails.config.http.trustProxy` property cannot be zero, empty string, null or NaN.\\nThe property is currently set to: `' + util.inspect(sails.config.http.trustProxy) + '`.\\nTo indicate that your app is directly facing the internet, set `trustProxy` to `false`.","messagePattern":"The `sails\\.config\\.http\\.trustProxy` property cannot be zero, empty string, null or NaN\\.\\\\nThe property is currently set to: `' \\+ util\\.inspect\\(sails\\.config\\.http\\.trustProxy\\) \\+ '`\\.\\\\nTo indicate that your app is directly facing the internet, set `trustProxy` to `false`\\.","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/hooks/http/index.js","lineNumber":173,"sourceCode":"        throw flaverr({ name: 'userError', code: 'E_INVALID_HTTP_CONFIG' }, new Error(\n          '\\n-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-\\n'+\n          'The `sails.config.http.loadMiddleware` setting is no longer available in Sails 1.0.\\n'+\n          'Please use `sails.config.http.middleware.order` instead.\\n'+\n          '-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-\\n'\n        ));\n      }\n\n      if (sails.config.cache) {\n        throw flaverr({ name: 'userError', code: 'E_INVALID_HTTP_CONFIG' }, new Error(\n          '\\n-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-\\n'+\n          'The `sails.config.cache` setting is no longer available in Sails 1.0.\\n'+\n          'Please use `sails.config.http.cache` instead.\\n'+\n          '-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-\\n'\n        ));\n      }\n\n      if (sails.config.http.trustProxy === 0 || sails.config.http.trustProxy === '' || sails.config.http.trustProxy === null || _.isNaN(sails.config.http.trustProxy)) {\n        throw flaverr({ name: 'userError', code: 'E_HTTP_BAD_TRUSTPROXY' }, new Error(\n          '\\n-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-\\n'+\n          'The `sails.config.http.trustProxy` property cannot be zero, empty string, null or NaN.\\n'+\n          'The property is currently set to: `' + util.inspect(sails.config.http.trustProxy) + '`.\\n'+\n          'To indicate that your app is directly facing the internet, set `trustProxy` to `false`.\\n'+\n          '-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-\\n'));\n      }\n\n      // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n      // BACKWARDS COMPATIBILITY:\n      // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n      if (sails.config.http.bodyParser) {\n        sails.log.debug('The `sails.config.http.bodyParser` setting is deprecated in Sails 1.0.');\n        sails.log.debug('Please use `sails.config.http.middleware.bodyParser` instead.');\n        sails.log.debug('See http://sailsjs.com/docs/concepts/middleware for more details.\\n');\n\n        if (!sails.config.http.middleware.bodyParser) {\n          sails.config.http.middleware.bodyParser = sails.config.http.bodyParser;\n        }","sourceCodeStart":155,"sourceCodeEnd":191,"githubUrl":"https://github.com/balderdashy/sails/blob/7b76422cc27823df033572bdda5c4910a68b697f/lib/hooks/http/index.js#L155-L191","documentation":"Error \"The `sails.config.http.trustProxy` property cannot be zero, empty string, null or NaN.\\nThe property is currently set to: `' + util.inspect(sails.config.http.trustProxy) + '`.\\nTo indicate that your app is directly facing the internet, set `trustProxy` to `false`.\" thrown in balderdashy/sails.","triggerScenarios":"Thrown at lib/hooks/http/index.js:173 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7b76422cc27823df033572bdda5c4910a68b697f","analyzedAt":"2026-09-01T04:01:57.104Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}