mirror of
https://github.com/github/codeql.git
synced 2026-04-30 03:05:15 +02:00
JavaScript: Add support for rateLimit export from express-rate-limit package.
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import express from "express";
|
||||
import { rateLimit } from "express-rate-limit";
|
||||
|
||||
const app = express();
|
||||
|
||||
const limiter = rateLimit();
|
||||
app.use(limiter)
|
||||
|
||||
function expensiveHandler(req, res) { login(); }
|
||||
app.get('/:path', expensiveHandler); // OK
|
||||
@@ -0,0 +1,10 @@
|
||||
import express from "express";
|
||||
import rateLimit from "express-rate-limit";
|
||||
|
||||
const app = express();
|
||||
|
||||
const limiter = rateLimit();
|
||||
app.use(limiter)
|
||||
|
||||
function expensiveHandler(req, res) { login(); }
|
||||
app.get('/:path', expensiveHandler); // OK
|
||||
Reference in New Issue
Block a user