Fix HostAuthorization blocking all RSpec request specs #103
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Bug
Lineage
Standalone — discovered while running RSpec suite for PR #102.
Repo
ldraney/landscaping-assistantWhat Broke
Every RSpec request spec returns 403 Forbidden with "Blocked hosts: www.example.com". The test config at
config/environments/test.rb:32hasconfig.hosts.clear, which should allow all hosts, but Rails 8.1'sHostAuthorizationmiddleware still rejectswww.example.com(RSpec's default request host). This breaks ALL 50+ request specs — only model specs pass.Error in test output:
Repro Steps
docker compose exec web bundle exec rspecExpected Behavior
Request specs should reach the application and return normal responses.
config.hosts.clearin test.rb should disable host checking entirely.Environment
Acceptance Criteria
bundle exec rspecpasses request specsRelated
config/environments/test.rb:32— current (broken) host configScope Review: READY
Review note:
review-1315-2026-06-04Ticket is well-scoped: all bug template sections present, file target verified (
config/environments/test.rb:32containsconfig.hosts.clear), single-repo fix, 3 verifiable acceptance criteria, no blocking dependencies. 1-point bug fix — no decomposition needed.Two pre-existing documentation gaps flagged (not blocking):
[SCOPE]Add "testing" user story entry to project-landscaping-assistant user-stories section[SCOPE]Create architecture note arch-rails-app (used by 20+ board items)