Module: Rack::Attack::FallbackPathNormalizer

Defined in:
lib/rack/attack/path_normalizer.rb

Overview

When using Rack::Attack with a Rails app, developers expect the request path to be normalized. In particular, trailing slashes are stripped. (See git.io/v0rrR 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



12
13
14
# File 'lib/rack/attack/path_normalizer.rb', line 12

def self.normalize_path(path)
  path
end