93016
作成したRuby on RailsアプリをHerokuにデプロイして確認したところ、アクセスが拒否される事案が発生しました。  
Herokuで確認するとデプロイは成功しているのですが、アクセスが拒否される理由が分かりません。

バージョン  
Ruby 3.0.0  
Rails 6.1.7  
Heroku -20

[![画像の説明をここに入力](https://i.stack.imgur.com/NZqhr.png)](https://i.stack.imgur.com/NZqhr.png)

```

    (master) $ git push heroku master
    › Warning: heroku update available from 7.60.1 to 7.66.4.
    Setting stack to heroku-20... done
    ubuntu:~/environment/test (master) $ git push heroku master
    Counting objects: 1319, done.
    Compressing objects: 100% (1247/1247), done.
    Writing objects: 100% (1319/1319), 3.37 MiB | 2.22 MiB/s, done.
    Total 1319 (delta 772), reused 0 (delta 0)
    remote: Compressing source files... done.
    remote: Building source:
    remote:
    remote: -----> Building on the Heroku-20 stack
    remote: -----> Determining which buildpack to use for this app
    remote: ! Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used.
    remote: Detected buildpacks: Ruby,Node.js
    remote: See https://devcenter.heroku.com/articles/buildpacks#buildpack-detect-order
    remote: -----> Ruby app detected
    remote: -----> Installing bundler 2.3.25
    remote: -----> Removing BUNDLED WITH version in the Gemfile.lock
    remote: -----> Compiling Ruby/Rails
    remote: -----> Using Ruby version: ruby-3.0.0
    remote: -----> Installing dependencies using bundler 2.3.25
    remote: Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin BUNDLE_DEPLOYMENT=1 bundle install -j4
    remote: Fetching gem metadata from https://rubygems.org/..........
    remote: Fetching rake 13.0.6
    remote: Installing rake 13.0.6
    remote: Fetching concurrent-ruby 1.1.10
    remote: Fetching minitest 5.16.3
    remote: Fetching zeitwerk 2.6.0
    remote: Fetching builder 3.2.4
    remote: Installing zeitwerk 2.6.0
    remote: Installing builder 3.2.4
    remote: Installing concurrent-ruby 1.1.10
    remote: Installing minitest 5.16.3
    remote: Fetching erubi 1.11.0
    remote: Fetching racc 1.6.0
    remote: Installing erubi 1.11.0
    remote: Fetching crass 1.0.6
    remote: Installing racc 1.6.0 with native extensions
    remote: Fetching rack 2.2.4
    remote: Installing crass 1.0.6
    remote: Fetching nio4r 2.5.8
    remote: Installing rack 2.2.4
    remote: Installing nio4r 2.5.8 with native extensions
    remote: Fetching websocket-extensions 0.1.5
    remote: Installing websocket-extensions 0.1.5
    remote: Fetching marcel 1.0.2
    remote: Installing marcel 1.0.2
    remote: Fetching mini_mime 1.1.2
    remote: Fetching aws_cf_signer 0.1.3
    remote: Installing aws_cf_signer 0.1.3
    remote: Installing mini_mime 1.1.2
    remote: Fetching bcrypt 3.1.18
    remote: Installing bcrypt 3.1.18 with native extensions
    remote: Fetching msgpack 1.5.6
    remote: Installing msgpack 1.5.6 with native extensions
    remote: Fetching kaminari-core 1.2.2
    remote: Installing kaminari-core 1.2.2
    remote: Using bundler 2.3.25
    remote: Fetching method_source 1.0.0
    remote: Installing method_source 1.0.0
    remote: Fetching thor 1.2.1
    remote: Installing thor 1.2.1
    remote: Fetching mime-types-data 3.2022.0105
    remote: Installing mime-types-data 3.2022.0105
    remote: Fetching ssrf_filter 1.1.1
    remote: Installing ssrf_filter 1.1.1
    remote: Fetching http-accept 1.7.0
    remote: Installing http-accept 1.7.0
    remote: Fetching unf_ext 0.0.8.2
    remote: Fetching netrc 0.11.0
    remote: Installing netrc 0.11.0
    remote: Installing unf_ext 0.0.8.2 with native extensions
    remote: Fetching orm_adapter 0.5.0
    remote: Installing orm_adapter 0.5.0
    remote: Fetching dotenv 2.8.1
    remote: Installing dotenv 2.8.1
    remote: Fetching ffi 1.15.5
    remote: Installing ffi 1.15.5 with native extensions
    remote: Fetching mini_magick 4.11.0
    remote: Installing mini_magick 4.11.0
    remote: Fetching mysql2 0.5.4
    remote: Installing mysql2 0.5.4 with native extensions
    remote: Fetching timeout 0.3.0
    remote: Installing timeout 0.3.0
    remote: Fetching pg 1.4.5
    remote: Installing pg 1.4.5 with native extensions
    remote: Fetching tilt 2.0.11
    remote: Installing tilt 2.0.11
    remote: Fetching semantic_range 3.0.0
    remote: Installing semantic_range 3.0.0
    remote: Fetching turbolinks-source 5.2.0
    remote: Installing turbolinks-source 5.2.0
    remote: Fetching i18n 1.12.0
    remote: Installing i18n 1.12.0
    remote: Fetching tzinfo 2.0.5
    remote: Installing tzinfo 2.0.5
    remote: Fetching websocket-driver 0.7.5
    remote: Installing websocket-driver 0.7.5 with native extensions
    remote: Fetching rack-test 2.0.2
    remote: Installing rack-test 2.0.2
    remote: Fetching sprockets 4.1.1
    remote: Installing sprockets 4.1.1
    remote: Fetching warden 1.2.9
    remote: Installing warden 1.2.9
    remote: Fetching rack-proxy 0.7.4
    remote: Installing rack-proxy 0.7.4
    remote: Fetching mail 2.7.1
    remote: Installing mail 2.7.1
    remote: Fetching nokogiri 1.13.8 (x86_64-linux)
    remote: Installing nokogiri 1.13.8 (x86_64-linux)
    remote: Fetching mime-types 3.4.1
    remote: Installing mime-types 3.4.1
    remote: Fetching unf 0.1.4
    remote: Installing unf 0.1.4
    remote: Fetching puma 5.6.5
    remote: Installing puma 5.6.5 with native extensions
    remote: Fetching net-protocol 0.1.3
    remote: Installing net-protocol 0.1.3
    remote: Fetching bootsnap 1.13.0
    remote: Installing bootsnap 1.13.0 with native extensions
    remote: Fetching turbolinks 5.2.1
    remote: Installing turbolinks 5.2.1
    remote: Fetching activesupport 6.1.7
    remote: Installing activesupport 6.1.7
    remote: Fetching loofah 2.19.0
    remote: Installing loofah 2.19.0
    remote: Fetching domain_name 0.5.20190701
    remote: Installing domain_name 0.5.20190701
    remote: Fetching net-imap 0.3.1
    remote: Installing net-imap 0.3.1
    remote: Fetching net-pop 0.1.2
    remote: Fetching net-smtp 0.3.3
    remote: Installing net-smtp 0.3.3
    remote: Fetching rails-dom-testing 2.0.3
    remote: Installing net-pop 0.1.2
    remote: Installing rails-dom-testing 2.0.3
    remote: Fetching globalid 1.0.0
    remote: Fetching activemodel 6.1.7
    remote: Installing globalid 1.0.0
    remote: Installing activemodel 6.1.7
    remote: Fetching pagy 5.10.1
    remote: Installing pagy 5.10.1
    remote: Fetching rails-html-sanitizer 1.4.3
    remote: Installing rails-html-sanitizer 1.4.3
    remote: Fetching http-cookie 1.0.5
    remote: Fetching sassc 2.4.0
    remote: Installing http-cookie 1.0.5
    remote: Installing sassc 2.4.0 with native extensions
    remote: Fetching activejob 6.1.7
    remote: Installing activejob 6.1.7
    remote: Fetching activerecord 6.1.7
    remote: Installing activerecord 6.1.7
    remote: Fetching carrierwave 1.3.2
    remote: Installing carrierwave 1.3.2
    remote: Fetching actionview 6.1.7
    remote: Installing actionview 6.1.7
    remote: Fetching rest-client 2.1.0
    remote: Installing rest-client 2.1.0
    remote: Fetching kaminari-activerecord 1.2.2
    remote: Installing kaminari-activerecord 1.2.2
    remote: Fetching paranoia 2.6.0
    remote: Installing paranoia 2.6.0
    remote: Fetching ransack 3.2.1
    remote: Installing ransack 3.2.1
    remote: Fetching actionpack 6.1.7
    remote: Installing actionpack 6.1.7
    remote: Fetching kaminari-actionview 1.2.2
    remote: Installing kaminari-actionview 1.2.2
    remote: Fetching jbuilder 2.11.5
    remote: Installing jbuilder 2.11.5
    remote: Fetching cloudinary 1.0.85
    remote: Fetching actioncable 6.1.7
    remote: Installing actioncable 6.1.7
    remote: Fetching activestorage 6.1.7
    remote: Installing cloudinary 1.0.85
    remote: Installing activestorage 6.1.7
    remote: Fetching actionmailer 6.1.7
    remote: Installing actionmailer 6.1.7
    remote: Fetching railties 6.1.7
    remote: Fetching sprockets-rails 3.4.2
    remote: Installing railties 6.1.7
    remote: Installing sprockets-rails 3.4.2
    remote: Fetching kaminari 1.2.2
    remote: Installing kaminari 1.2.2
    remote: Fetching actionmailbox 6.1.7
    remote: Installing actionmailbox 6.1.7
    remote: Fetching actiontext 6.1.7
    remote: Installing actiontext 6.1.7
    remote: Fetching responders 3.0.1
    remote: Fetching rails 6.1.7
    remote: Installing responders 3.0.1
    remote: Installing rails 6.1.7
    remote: Fetching dotenv-rails 2.8.1
    remote: Fetching rails-i18n 7.0.5
    remote: Installing dotenv-rails 2.8.1
    remote: Fetching webpacker 5.4.3
    remote: Installing rails-i18n 7.0.5
    remote: Installing webpacker 5.4.3
    remote: Fetching bootstrap5-kaminari-views 0.0.1
    remote: Installing bootstrap5-kaminari-views 0.0.1
    remote: Fetching devise 4.8.1
    remote: Installing devise 4.8.1
    remote: Fetching devise-i18n 1.10.2
    remote: Installing devise-i18n 1.10.2
    remote: Fetching sassc-rails 2.1.2
    remote: Installing sassc-rails 2.1.2
    remote: Fetching sass-rails 6.0.0
    remote: Installing sass-rails 6.0.0
    remote: Bundle complete! 31 Gemfile dependencies, 93 gems now installed.
    remote: Gems in the groups 'development' and 'test' were not installed.
    remote: Bundled gems are installed into `./vendor/bundle`
    remote: Bundle completed (91.95s)
    remote: Cleaning up the bundler cache.
    remote: -----> Installing node-v16.18.1-linux-x64
    remote: -----> Installing yarn-v1.22.19
    remote: -----> Detecting rake tasks
    remote: -----> Preparing app for Rails asset pipeline
    remote: Running: rake assets:precompile
    remote: yarn install v
    
```
CC BY-SA 4.0
2022-12-26T02:41:57.833
93011
2022-12-26T10:10:07.433
2022-12-26T10:10:07.433
question
ruby-on-rails github heroku
herokuに作成したrailsアプリをデプロイしましたが、確認するとアクセス拒否されました。
これとかでしょうか

> config/enviroment/production.rb に  
>  config.hosts << "ホスト名" を追加したら解決しました

<https://teratail.com/questions/304298#reply-446806>
CC BY-SA 4.0
2022-12-26T07:40:17.400
93016
2022-12-26T07:40:17.400
15380
93011
answer