Rails 8 docker を使用している場合に rspec > requests spec で 403 エラーが発生した場合の確認点について
- POST
Rails 8 docker を使用している場合に rspec > requests spec で 403 エラーが発生した場合の確認点について調査したものを備忘録として残しておく
環境 ruby: 3.4.2 rails: 8.0.2 mode: API mode エラー内容 Rails 6 以降で追加された DNS リバインディングに関するエラーが発生している
※エラー内容と根本原因は異なるため注意
<!-- 一部抜粋 --> <main role="main" id="container"> <h2>To allow requests to these hosts, make sure they are valid hostnames (containing only numbers, letters, dashes and dots), then add the following to your environment configuration:</h2> <pre> config.hosts << "www.example.com" </pre> <p>For more details view: <a href="https://guides.