Turn off debug mode in production
info-leak-debug
Debug mode prints environment variables, settings and sometimes an interactive console to anyone who can trigger an error. Turn it off.
Frameworks
Express
- 1 Set NODE_ENV=production and disable error details
javascript
// Set in environment: NODE_ENV=production
// Error handler — don't leak stack traces
app.use((err, req, res, next) => {
res.status(err.status || 500).json({
error: process.env.NODE_ENV === 'production'
? 'Internal server error'
: err.message,
});
});Does your app still have this?
Scan your domain