Check for heroku url presence before working with it (#9866)

This commit is contained in:
Ben Halpern 2020-08-19 10:01:15 -04:00 committed by GitHub
parent 8ab7636c38
commit 244d632565
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -126,7 +126,7 @@ Rails.application.configure do
enable_starttls_auto: true
}
if ENV["HEROKU_APP_URL"] != config.app_domain
if ENV["HEROKU_APP_URL"].present? && ENV["HEROKU_APP_URL"] != config.app_domain
config.middleware.use Rack::HostRedirect,
ENV["HEROKU_APP_URL"] => config.app_domain
end