throttler icon indicating copy to clipboard operation
throttler copied to clipboard

feat(guard): get tracker support string array

Open MonveChen opened this issue 2 years ago • 1 comments

PR Checklist

Please check if your PR fulfills the following requirements:

  • [x] The commit message follows our guidelines: https://github.com/nestjs/nest/blob/master/CONTRIBUTING.md
  • [x] Tests for the changes have been added (for bug fixes / features)
  • [x] Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • [ ] Bugfix
  • [x] Feature
  • [ ] Code style update (formatting, local variables)
  • [ ] Refactoring (no functional changes, no api changes)
  • [ ] Build related changes
  • [ ] CI related changes
  • [ ] Other... Please describe:

What is the current behavior?

Multiple strings, such as req.ips or user identity, need to be restricted. And because req.ips[0] can be faked, all req.ips should be restricted

What is the new behavior?

Compatible with limiting multiple strings

Does this PR introduce a breaking change?

  • [ ] Yes
  • [x] No

Other information

MonveChen avatar May 27 '22 18:05 MonveChen

Code looks good overall. Sorry for taking so long to getting to a review. Can you also add a changeset for this as a minor bump? Just run yarn changeset and follow the wizard

sure.

MonveChen avatar Aug 01 '22 10:08 MonveChen