Meteor Guide: Security

With regard to rate limiting methods, why not retrieve the method names from exports:

const LISTS_METHODS = _.chain(exports)
  .keys()
  .reject((k)=> { return k.startsWith('__') })
  .value();

instead of hard coding them:

const LISTS_METHODS = _.pluck([
  insert,
  makePublic,
  makePrivate,
  updateName,
  remove,
], 'name');

Then you don’t have to remember to update the rate limiting section when you add and remove methods.

1 Like