Sha256: d103685f33a825739c5c401c0dc36ddeef32ccb21b69e16276ccfb7fd62494e3

Contents?: true

Size: 372 Bytes

Versions: 4

Compression:

Stored size: 372 Bytes

Contents

require_relative "../base"

module Suspenders
  module Production
    class SingleRedirect < Generators::Base
      def add_rack_canonical_host
        inject_into_file(
          "config/environments/production.rb",
          %{\n  config.middleware.use Rack::CanonicalHost, ENV.fetch("APPLICATION_HOST")},
          before: "\nend"
        )
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
suspenders-20230113.0 lib/suspenders/generators/production/single_redirect.rb
suspenders-1.56.1 lib/suspenders/generators/production/single_redirect.rb
suspenders-1.55.1 lib/suspenders/generators/production/single_redirect.rb
suspenders-1.55.0 lib/suspenders/generators/production/single_redirect.rb