1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Rails × Docker ログに「Cannot render console from Allowed networks」と出力される対処法

Posted at

ログに「Cannot render console from Allowed networks」と出力される対処法

環境

ruby 2.5.1
rails 5.2.4
docker 19.03.8

Ruby on Railsの開発環境で、DockerかVagrantを使っていて、”Cannot render console from 172.20.0.1! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255″ 「このIPアドレスではレンダリングできない」と言われた場合

うぉおおん?

Started GET "/" for 172.20.0.1 at 2020-03-28 09:15:23 +0000
web_1  | Cannot render console from 172.20.0.1! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255

Image from Gyazo

対処法は簡単だった

Webコンソールの設定で172.20.0.1ネットワークをホワイトリストに登録する

ホワイトリストとは?

config/environments/development.rbconfig.web_console.whitelisted_ips = ‘172.20.0.1’を追加(IPアドレスは自身のログに書いてあるIPアドレスを記述)

config/environments/development.rb
config.web_console.whitelisted_ips ='172.20.0.1'

Image from Gyazo

これで解決しました

docker → kubernetesに関してこれから投稿していきます。

##docker公式

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?