This website works better with JavaScript.
Home
Explore
Help
Sign In
closed-social
/
mastodon
Watch
3
Star
0
Fork
2
Code
Issues
5
Pull Requests
0
Projects
0
Releases
3
Wiki
Activity
Browse Source
Don't rate-limit PuSH endpoints
closed-social-glitch-2
Eugen Rochko
7 years ago
parent
4e351baf88
commit
c0555f2db6
1 changed files
with
1 additions
and
1 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-1
config/initializers/rack-attack.rb
+ 1
- 1
config/initializers/rack-attack.rb
View File
@ -1,7 +1,7 @@
class
Rack
::
Attack
# Rate limits for the API
throttle
(
'api'
,
limit
:
150
,
period
:
5
.
minutes
)
do
|
req
|
req
.
ip
if
req
.
path
.
match
(
/
\
A
\/
api
\/
/
)
req
.
ip
if
req
.
path
.
match
(
/
\
A
\/
api
\/
v
/
)
end
self
.
throttled_response
=
lambda
do
|
env
|
Write
Preview
Loading…
Cancel
Save