0
0

More than 1 year has passed since last update.

【Rails】Blocked host 解消法

Posted at

状況

任意のホスト名を指定してアクセスしようとした際に次のようなエラーが発生しました。

Blocked host: sample-host.com
To allow requests to sample-host.com, add the following to your environment configuration:
    config.hosts << "sample-host.com"

解消法

次のようにconfig/environments/development.rbに追加しホストを許可することで解消します。

development.rb

Rails.application.configure do

  config.hosts << "sample-host.com"

end

0
0
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
0
0