Sha256: a20968acf6f13e7e0ba5cc5d75b915e4f4ffc161f8583b04cdc49dd50ba71dac
Contents?: true
Size: 533 Bytes
Versions: 13
Compression:
Stored size: 533 Bytes
Contents
# frozen_string_literal: true say_git "Install rack-canonical-host" install_gem "rack-canonical-host" say_git "Use RAILS_HOSTNAME env var" document_deploy_var "RAILS_HOSTNAME", "Redirect all requests to the specified canonical hostname" insert_into_file "config.ru", %(use Rack::CanonicalHost, ENV.fetch("RAILS_HOSTNAME", nil) if ENV["RAILS_HOSTNAME"].present?\n), before: /^run Rails.application/ gsub_file "config/environments/production.rb", /\bhost: "example\.com"/, 'host: ENV.fetch("RAILS_HOSTNAME", "example.com")'
Version data entries
13 entries across 13 versions & 1 rubygems