Sha256: 2a72dc54be9b9a66f83c1c2e562a83d9d6b81b3435552427b740796d25e480a7

Contents?: true

Size: 374 Bytes

Versions: 1

Compression:

Stored size: 374 Bytes

Contents

require 'rack/protection'
require 'rack/rewrite'

module HerokuStandardConfig
  class Railtie < Rails::Railtie
    initializer "heroku_standard_config.insert_middleware" do |app|
      app.middleware.insert_before(Rack::Lock, Rack::Rewrite) do
        r301 %r{^/([^/]*)/(\?.*)?$}, '/$1$2'
      end

      app.middleware.use Rack::Protection::FrameOptions
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
heroku_standard_config-0.0.3 lib/heroku_standard_config.rb