Editorial question110.9K views537 votes0 answers4,622 following
AI-generatedTrusted Host Patterns Limit: Site Works Locally but Fails in Production When Host Header Differs
When developing a Drupal site locally, the trusted host validation is often bypassed, allowing the site to load without explicit entries in $settings['trusted_host_patterns']. In production, however, Drupal enforces the pattern list, and any request whose Host header does not match an allowed pattern results in a 403/503 response. This discrepancy becomes pr