Skip to content

Commit 95ce9fd

Browse files
authored
Merge pull request #579 from kyoshidajp/replace_git.io
Replace git.io URL
2 parents f5f92f4 + d3be2f3 commit 95ce9fd

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/rack/attack/cache.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def reset!
6262

6363
def key_and_expiry(unprefixed_key, period)
6464
@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
6666
expires_in = (period - (@last_epoch_time % period) + 1).to_i
6767
["#{prefix}:#{(@last_epoch_time / period).to_i}:#{unprefixed_key}", expires_in]
6868
end

lib/rack/attack/path_normalizer.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ module Rack
44
class Attack
55
# When using Rack::Attack with a Rails app, developers expect the request path
66
# 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.)
810
#
911
# Look for an ActionDispatch utility class that Rails folks would expect
1012
# to normalize request paths. If unavailable, use a fallback class that

0 commit comments

Comments
 (0)