File tree 2 files changed +12
-12
lines changed
2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -107,16 +107,6 @@ class API {
107
107
// Basic auth
108
108
if ( this . config . auth ) app . use ( auth ( this . config . auth ) ) ;
109
109
110
- // Rate limiting
111
- if ( this . client && this . config . rateLimit )
112
- app . use (
113
- ratelimit ( {
114
- ...this . config . rateLimit ,
115
- db : this . client ,
116
- logger : this . logger
117
- } )
118
- ) ;
119
-
120
110
// Remove trailing slashes
121
111
app . use ( removeTrailingSlashes ( ) ) ;
122
112
@@ -148,6 +138,16 @@ class API {
148
138
// Passport
149
139
if ( this . passport ) app . use ( this . passport . initialize ( ) ) ;
150
140
141
+ // Rate limiting
142
+ if ( this . client && this . config . rateLimit )
143
+ app . use (
144
+ ratelimit ( {
145
+ ...this . config . rateLimit ,
146
+ db : this . client ,
147
+ logger : this . logger
148
+ } )
149
+ ) ;
150
+
151
151
// Store the user's last ip address in the background
152
152
if ( this . config . storeIPAddress ) {
153
153
const storeIPAddress = new StoreIPAddress ( {
Original file line number Diff line number Diff line change 11
11
" Nick Baugh <[email protected] > (http://niftylettuce.com/)"
12
12
],
13
13
"dependencies" : {
14
- "@koa/router" : " ^11.0.0 " ,
14
+ "@koa/router" : " ^11.0.1 " ,
15
15
"@ladjs/i18n" : " ^8.0.1" ,
16
16
"@ladjs/koa-simple-ratelimit" : " ^4.0.1" ,
17
17
"@ladjs/passport" : " ^5.0.3" ,
50
50
"ioredis" : " ^5.1.0" ,
51
51
"ioredis-mock" : " ^8.2.2" ,
52
52
"lint-staged" : " 13.0.3" ,
53
- "mongoose" : " ^6.4.2 " ,
53
+ "mongoose" : " ^6.4.3 " ,
54
54
"nyc" : " ^15.1.0" ,
55
55
"remark-cli" : " ^11.0.0" ,
56
56
"remark-preset-github" : " ^4.0.4" ,
You can’t perform that action at this time.
0 commit comments