Skip to content

Implementation Question #96

@imRohan

Description

@imRohan

I had a question regarding my implementation, and I was wondering if what I am experiencing is a result of bad configuration on my part.

Essentially, I am trying to limit requests of a particular route to 20 requests every 10 seconds. My thinking was that if the maxWait and the lifetime were both set to 10seconds then the freeRetries counter would reset every 10 seconds. Allowing users to once again request up to 20 times before having to wait.

Is this correct?

const bruteForce = new expressBrute(store, {
  freeRetries: 20,
  minWait: 5000, // 5s
  maxWait: 10000, // 10s
  lifetime: 10, // 10s,
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions