code: function getAppAttributes(attrs, req, res) {
        if (typeof attrs === 'function') {
          attrs = attrs(req, res);
        }
        return attrs || {};
      }
docs: Allow `appAttributes` to be a function for lazy-instantiation based on `req` and `res`.