Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add request rate limiter based on IP address #8174

Merged
merged 50 commits into from
Jan 6, 2023
Merged
Show file tree
Hide file tree
Changes from 47 commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
7cddeba
feat: add rate limiter
dblythy Sep 18, 2022
5b3fd30
Update RateLimit.spec.js
dblythy Sep 18, 2022
eac6544
Update package.json
dblythy Sep 18, 2022
67f4b32
Merge branch 'alpha' into express-rate-limit
mtrezza Sep 18, 2022
25e73b4
reorder
dblythy Sep 19, 2022
f53ac82
Update middlewares.js
dblythy Sep 19, 2022
95f0fbd
fix tests
dblythy Sep 19, 2022
79cbc0b
Update RateLimit.spec.js
dblythy Sep 19, 2022
e539b43
Update middlewares.js
dblythy Sep 19, 2022
bef901f
enforce fields
dblythy Sep 19, 2022
fb52fec
Merge branch 'alpha' into express-rate-limit
dblythy Sep 20, 2022
2b7ee4a
Update src/Options/index.js
dblythy Sep 20, 2022
0d155fd
Update src/Config.js
dblythy Sep 20, 2022
7b9df99
Update src/Config.js
dblythy Sep 20, 2022
2df37e2
refactor
dblythy Sep 20, 2022
f03e1cd
remove default path
dblythy Sep 20, 2022
164329d
run prettier
dblythy Sep 20, 2022
77b57a1
add cluster
dblythy Sep 20, 2022
35e8092
tests
dblythy Sep 20, 2022
22f9c7a
Merge branch 'alpha' into express-rate-limit
dblythy Sep 21, 2022
6205337
Merge branch 'alpha' into express-rate-limit
dblythy Sep 27, 2022
60439bc
Merge branch 'alpha' into express-rate-limit
dblythy Sep 29, 2022
d5eed75
Update RateLimit.spec.js
dblythy Sep 29, 2022
267e528
Merge branch 'express-rate-limit' of https://github.com/dblythy/parse…
dblythy Sep 29, 2022
c3d5258
default rateLimit
dblythy Sep 29, 2022
0036437
Update AuthenticationAdapters.spec.js
dblythy Sep 29, 2022
46d1042
Update AuthenticationAdapters.spec.js
dblythy Sep 29, 2022
d142a33
Update RateLimit.spec.js
dblythy Sep 29, 2022
8cfce2f
Merge branch 'alpha' into express-rate-limit
dblythy Oct 12, 2022
18e9e9d
allow for files
dblythy Oct 12, 2022
560c7ee
Update ParseServer.js
dblythy Oct 12, 2022
79be980
Update RateLimit.spec.js
dblythy Oct 12, 2022
b93c37b
Update src/Options/docs.js
mtrezza Oct 12, 2022
14ad8d2
Update src/Options/index.js
mtrezza Oct 12, 2022
444a59d
Merge branch 'alpha' into express-rate-limit
dblythy Oct 27, 2022
2b551fe
run defintions
dblythy Oct 27, 2022
7503b96
Update RateLimit.spec.js
dblythy Oct 27, 2022
8e9a999
Update RateLimit.spec.js
dblythy Oct 27, 2022
76a744a
Merge branch 'alpha' into express-rate-limit
mtrezza Oct 27, 2022
c499299
Merge branch 'alpha' into express-rate-limit
mtrezza Oct 31, 2022
850bb13
Update src/middlewares.js
dblythy Nov 28, 2022
9728a5a
Merge branch 'alpha' into express-rate-limit
dblythy Dec 30, 2022
3e2b227
Update Config.js
dblythy Dec 30, 2022
496e305
sip
dblythy Dec 30, 2022
d012fa5
Update package-lock.json
dblythy Dec 30, 2022
835e6f3
Update middlewares.js
dblythy Dec 30, 2022
aba538b
wip
dblythy Dec 30, 2022
6d930d3
Apply suggestions from code review
dblythy Jan 6, 2023
3b7e520
Merge branch 'alpha' into express-rate-limit
dblythy Jan 6, 2023
160706c
Merge branch 'alpha' into express-rate-limit
mtrezza Jan 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"cors": "2.8.5",
"deepcopy": "2.1.0",
"express": "4.18.2",
"express-rate-limit": "6.6.0",
"follow-redirects": "1.15.2",
"graphql": "16.6.0",
"graphql-list-fields": "2.0.2",
Expand All @@ -48,6 +49,7 @@
"mongodb": "4.10.0",
"mustache": "4.2.0",
"parse": "3.4.2",
"path-to-regexp": "0.1.7",
"pg-monitor": "1.5.0",
"pg-promise": "10.12.1",
"pluralize": "8.0.0",
Expand Down Expand Up @@ -97,8 +99,8 @@
"mock-mail-adapter": "file:spec/dependencies/mock-mail-adapter",
"mongodb-runner": "4.8.1",
"mongodb-version-list": "1.0.0",
"node-fetch": "3.2.10",
"node-abort-controller": "3.0.1",
"node-fetch": "3.2.10",
"nyc": "15.1.0",
"prettier": "2.0.5",
"semantic-release": "17.4.6",
Expand Down
5 changes: 4 additions & 1 deletion resources/buildConfigDefinitions.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ const nestedOptionEnvPrefix = {
SecurityOptions: 'PARSE_SERVER_SECURITY_',
SchemaOptions: 'PARSE_SERVER_SCHEMA_',
LogLevels: 'PARSE_SERVER_LOG_LEVELS_',
RateLimitOptions: 'PARSE_SERVER_RATE_LIMIT_',
};

function last(array) {
Expand Down Expand Up @@ -111,7 +112,9 @@ function processProperty(property, iface) {
}
let defaultValue;
if (defaultLine) {
defaultValue = defaultLine.split(' ')[1];
const defaultArray = defaultLine.split(' ');
defaultArray.shift();
defaultValue = defaultArray.join(' ');
}
let type = property.value.type;
let isRequired = true;
Expand Down
Loading