balderdashy/sails · error
E_HTTP_BAD_TRUSTPROXY
E_HTTP_BAD_TRUSTPROXY
Error message
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`.
What it means
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.
Source
Thrown at lib/hooks/http/index.js:173
throw flaverr({ name: 'userError', code: 'E_INVALID_HTTP_CONFIG' }, new Error(
'\n-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-\n'+
'The `sails.config.http.loadMiddleware` setting is no longer available in Sails 1.0.\n'+
'Please use `sails.config.http.middleware.order` instead.\n'+
'-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-\n'
));
}
if (sails.config.cache) {
throw flaverr({ name: 'userError', code: 'E_INVALID_HTTP_CONFIG' }, new Error(
'\n-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-\n'+
'The `sails.config.cache` setting is no longer available in Sails 1.0.\n'+
'Please use `sails.config.http.cache` instead.\n'+
'-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-\n'
));
}
if (sails.config.http.trustProxy === 0 || sails.config.http.trustProxy === '' || sails.config.http.trustProxy === null || _.isNaN(sails.config.http.trustProxy)) {
throw flaverr({ name: 'userError', code: 'E_HTTP_BAD_TRUSTPROXY' }, new Error(
'\n-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-\n'+
'The `sails.config.http.trustProxy` property cannot be zero, empty string, null or NaN.\n'+
'The property is currently set to: `' + util.inspect(sails.config.http.trustProxy) + '`.\n'+
'To indicate that your app is directly facing the internet, set `trustProxy` to `false`.\n'+
'-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-\n'));
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// BACKWARDS COMPATIBILITY:
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
if (sails.config.http.bodyParser) {
sails.log.debug('The `sails.config.http.bodyParser` setting is deprecated in Sails 1.0.');
sails.log.debug('Please use `sails.config.http.middleware.bodyParser` instead.');
sails.log.debug('See http://sailsjs.com/docs/concepts/middleware for more details.\n');
if (!sails.config.http.middleware.bodyParser) {
sails.config.http.middleware.bodyParser = sails.config.http.bodyParser;
}View on GitHub (pinned to 7b76422cc2)
When it happens
Trigger: Thrown at lib/hooks/http/index.js:173 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of balderdashy/sails@7b76422cc2 (2026-09-01).
Data as JSON: /api/errors/824571c3e860fa0d.
Report an issue: GitHub.