openstreetmap-website/config/initializers/uri_sanitizer.rb
Tom Hughes e20bb507f1 Fix issues with bogus % encoded sequences in URLs
Add a URI sanitizer to the rack stack avoid rack throwing
exceptions on the server side, and ignore errors decoding
components on the client side.

Fixes #1101
2015-12-07 13:52:20 +00:00

2 lines
118 B
Ruby

# Add URI sanitizer to rack middleware
Rails.configuration.middleware.insert_before Rack::Runtime, Rack::URISanitizer