whitequark/rack-utf8_sanitizer — pull request #13 by aaronrenner (2014-07-04 15:55:35+00:00)
Title: Ensure Rack::UTF8 Sanitizer is first middleware

If you set config.force_ssl=true in the rails app, it inserts the ActionDispatch::SSL middleware before Rack::Runtime. ActionDispatch::SSL also suffers from the utf8 issue. If we do config.middleware.insert 0, this ensures Rack::UTF8Sanitizer is at the top of the stack.