Try out new Rails rate limiting
All checks were successful
Ruby CI / test (pull_request) Successful in 21s
All checks were successful
Ruby CI / test (pull_request) Successful in 21s
This commit is contained in:
parent
53ae35d75f
commit
83cedd8a9b
1 changed files with 1 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
class SessionsController < ApplicationController
|
||||
require_unregistered_user only: %i[new create]
|
||||
rate_limit to: 5, within: 1.minute, only: :create, with: -> { redirect_to new_session_url, alert: "Cannot currently login" }
|
||||
# GET /sessions/new
|
||||
def new
|
||||
@session = Session.new
|
||||
|
|
Loading…
Reference in a new issue