add rack-utf8_sanitizer gem
This commit is contained in:
parent
b1fb82834e
commit
366e17b75d
2
Gemfile
2
Gemfile
|
@ -102,6 +102,8 @@ source 'https://rails-assets.org' do
|
|||
gem 'rails-assets-notifyjs'
|
||||
end
|
||||
|
||||
gem 'rack-utf8_sanitizer'
|
||||
|
||||
group :production do
|
||||
gem 'airbrake'
|
||||
#gem 'bluepill', '~> 0.0.60', require: false
|
||||
|
|
|
@ -361,6 +361,8 @@ GEM
|
|||
rack (>= 1.0)
|
||||
rack-throttle (0.3.0)
|
||||
rack (>= 1.0.0)
|
||||
rack-utf8_sanitizer (1.3.0)
|
||||
rack (~> 1.0)
|
||||
rails (4.1.9)
|
||||
actionmailer (= 4.1.9)
|
||||
actionpack (= 4.1.9)
|
||||
|
@ -636,6 +638,7 @@ DEPENDENCIES
|
|||
protected_attributes
|
||||
puma
|
||||
rack-throttle (~> 0.3.0)
|
||||
rack-utf8_sanitizer
|
||||
rails (= 4.1.9)
|
||||
rails-assets-notifyjs!
|
||||
rails3-generators
|
||||
|
|
|
@ -21,6 +21,8 @@ module Rosa
|
|||
|
||||
# Rate limit
|
||||
config.middleware.insert_before Rack::Runtime, ApiDefender
|
||||
# Rack::UTF8Sanitizer is a Rack middleware which cleans up invalid UTF8 characters in request URI and headers.
|
||||
config.middleware.insert 0, Rack::UTF8Sanitizer
|
||||
|
||||
config.autoload_paths += %W(#{config.root}/lib)
|
||||
|
||||
|
|
Loading…
Reference in New Issue