Skip to content

Commit

Permalink
Disable legacy headers (#636)
Browse files Browse the repository at this point in the history
* Return limits and remaining count in headers

* Use keycard.js from github

* Update keycard.js

* Update keycard.js package

* Disable legacy headers

* Update rateLimit.ts
  • Loading branch information
ChaituVR authored Aug 9, 2023
1 parent 7b32c35 commit 6f30287
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/helpers/rateLimit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export default rateLimit({
max: 60,
keyGenerator: req => getIp(req),
standardHeaders: true,
legacyHeaders: false,
skip: (req, res) => {
const keycardData = res.locals.keycardData;
if (keycardData?.valid && !keycardData.rateLimited) {
Expand Down

0 comments on commit 6f30287

Please sign in to comment.