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