docs(docs.nestjs.com) show example of enabling Throttle rate limiting… #2488
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
show example of enabling Throttle rate limiting behind proxies with express
the documentation was unsufficient to succesfuly implement the throttling since the external link to express suggested using 'app.set' method, wich by default throws 'property set does not exist` error
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
documentation for rate limiting behind proxies is insufficient to implement the throttling, since the external link to express suggested using
app.set('trust proxy', 'loopback')
method, which in NestJs throwsproperty set does not exist
errorIssue Number: N/A
What is the new behavior?
To successfully apply
app.set('trust proxy', 'loopback')
one needs to modify main.ts as shown in the commitspecifically changeing:
const app = await NestFactory.create<NestExpressApplication>(AppModule);
Does this PR introduce a breaking change?
Other information