Skip to content

Commit

Permalink
Merge pull request #3277 from alphagov/add-hosts
Browse files Browse the repository at this point in the history
Configure hosts for application
  • Loading branch information
ChrisBAshton authored Oct 10, 2024
2 parents f10da60 + 03c58fd commit c67319e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@
config.active_job.logger = Sidekiq.logger

# Enable DNS rebinding protection and other `Host` header attacks.
# config.hosts = [
# "example.com", # Allow requests from example.com
# /.*\.example\.com/ # Allow requests from subdomains like `www.example.com`
# ]
config.hosts = [
/content-publisher\..*gov.uk?/,
]

# Skip DNS rebinding protection for the default health check endpoint.
# config.host_authorization = { exclude: ->(request) { request.path == "/up" } }
config.host_authorization = { exclude: ->(request) { request.path.match?("^\/healthcheck") } }
end

0 comments on commit c67319e

Please sign in to comment.