mirror of
https://github.com/docusealco/docuseal
synced 2026-11-07 07:22:32 -05:00
add ratelimit
This commit is contained in:
1 parent
a8433e9bd3
commit
218c22da21
2 files changed
+7
-2
No files matched your search
@@ -10,6 +10,8 @@ class SubmitFormEmail2fasController < ApplicationController
|
||||
|
||||
def create
|
||||
RateLimit.call("verify-2fa-code-#{@submitter.id}", limit: 2, ttl: 45.seconds, enabled: true)
|
||||
RateLimit.call("verify-2fa-code-1h-#{@submitter.id}", limit: 10, ttl: 1.hour, enabled: true)
|
||||
RateLimit.call("verify-2fa-code-1d-#{@submitter.id}", limit: 20, ttl: 1.day, enabled: true)
|
||||
|
||||
value = [@submitter.email.downcase.strip, @submitter.slug].join(':')
|
||||
|
||||
|
||||
Reference in new issue
Block a user