- Defined in:
When using Rack::Attack with a Rails app, developers expect the request path to be normalized. In particular, trailing slashes are stripped. (See github.com/rails/rails/blob/f8edd20/actionpack/lib/action_dispatch/journey/router/utils.rb#L5-L22 for implementation.)
Look for an ActionDispatch utility class that Rails folks would expect to normalize request paths. If unavailable, use a fallback class that doesn’t normalize the path (as a non-Rails rack app developer expects).
Class Method Summary collapse
Class Method Details
.normalize_path(path) ⇒ Object
16 17 18
# File 'lib/rack/attack/path_normalizer.rb', line 16 def self.normalize_path(path) path end