setConfig(req, failGracefully = false) {
    req.config = Config.get(req.params.appId || req.query.appId);
    if (!req.config && !failGracefully) {
      this.invalidRequest();
    }
    return Promise.resolve();
  }
Sets the Parse Server configuration in the request object to make it
easily accessible throughtout request processing.
@param {Object} req The request.
@param {Boolean} failGracefully Is true if failing to set the config should
not result in an invalid request response. Default is `false`.