diff options
Diffstat (limited to 'config/application.rb')
-rw-r--r-- | config/application.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/config/application.rb b/config/application.rb index fc8e0059e..ff72df015 100644 --- a/config/application.rb +++ b/config/application.rb @@ -61,7 +61,6 @@ module Alaveteli config.action_dispatch.rack_cache = nil config.after_initialize do |app| - require 'routing_filters.rb' # Add a catch-all route to force routing errors to be handled by the application, # rather than by middleware. app.routes.append{ match '*path', :to => 'general#not_found' } @@ -69,11 +68,16 @@ module Alaveteli config.autoload_paths << "#{Rails.root.to_s}/lib/mail_handler" config.autoload_paths << "#{Rails.root.to_s}/lib/attachment_to_html" + config.autoload_paths << "#{Rails.root.to_s}/lib/health_checks" # See Rails::Configuration for more options ENV['RECAPTCHA_PUBLIC_KEY'] = ::AlaveteliConfiguration::recaptcha_public_key ENV['RECAPTCHA_PRIVATE_KEY'] = ::AlaveteliConfiguration::recaptcha_private_key + if RUBY_VERSION.to_f >= 1.9 + config.middleware.insert 0, Rack::UTF8Sanitizer + end + # Insert a bit of middleware code to prevent uneeded cookie setting. require "#{Rails.root}/lib/whatdotheyknow/strip_empty_sessions" config.middleware.insert_before ::ActionDispatch::Cookies, WhatDoTheyKnow::StripEmptySessions, :key => '_wdtk_cookie_session', :path => "/", :httponly => true |