Treat application settings as a well-defined, centrally managed API rather than ad-hoc values scattered through the codebase.
app.set() / app.get()), never via direct object access like app.settings.foo; direct access bypasses validation and has been deprecated since 3.0.defaultConfiguration (or equivalent), instead of inlining fallback logic at each call site. For example, set app.set('jsonp callback name', 'callback') in defaultConfiguration rather than doing this.req.query[app.get('jsonp callback name') || 'callback'] wherever it’s needed.etag must resolve to an actual boolean before being forwarded (opts.etag = !!app.get('etag')), since passing undefined or non-boolean values invites undefined behavior downstream.fn.name, which can be altered by minifiers/bundlers and break silently in production.Following these rules keeps configuration behavior predictable, backward-compatible, and easy to reason about across the framework and its middleware.</description> </invoke>