1
0

【DeviseTokenAuth】UnsafeRedirectError解消法

Last updated at Posted at 2024-01-25

はじめに

DeviseTokenAuthを使用している際にredirect_toが実行されるとUnsafeRedirectErrorが発生します。

エラーに関する詳細は以下のページをご参照ください。

解消法

外部リダイレクトしているコントローラーに以下を追加します。

  def redirect_options
    { allow_other_host: true }
  end

参考

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