File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ def reset!
62
62
63
63
def key_and_expiry ( unprefixed_key , period )
64
64
@last_epoch_time = Time . now . to_i
65
- # Add 1 to expires_in to avoid timing error: https://git.io/i1PHXA
65
+ # Add 1 to expires_in to avoid timing error: https://github.com/rack/rack-attack/pull/85
66
66
expires_in = ( period - ( @last_epoch_time % period ) + 1 ) . to_i
67
67
[ "#{ prefix } :#{ ( @last_epoch_time / period ) . to_i } :#{ unprefixed_key } " , expires_in ]
68
68
end
Original file line number Diff line number Diff line change @@ -4,7 +4,9 @@ module Rack
4
4
class Attack
5
5
# When using Rack::Attack with a Rails app, developers expect the request path
6
6
# to be normalized. In particular, trailing slashes are stripped.
7
- # (See https://git.io/v0rrR for implementation.)
7
+ # (See
8
+ # https://github.com/rails/rails/blob/f8edd20/actionpack/lib/action_dispatch/journey/router/utils.rb#L5-L22
9
+ # for implementation.)
8
10
#
9
11
# Look for an ActionDispatch utility class that Rails folks would expect
10
12
# to normalize request paths. If unavailable, use a fallback class that
You can’t perform that action at this time.
0 commit comments