Skip to content

Commit

Permalink
Merge pull request #1189 from alphagov/add-hosts
Browse files Browse the repository at this point in the history
Configure hosts for application
  • Loading branch information
KludgeKML authored Oct 30, 2024
2 parents 7acad88 + d159477 commit 383fb2c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,13 @@

# Do not dump schema after migrations.
config.active_record.dump_schema_after_migration = false

# Enable DNS rebinding protection and other `Host` header attacks.
config.hosts = [
/places-manager\..*\.gov.uk$/,
"places-manager",
]

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

0 comments on commit 383fb2c

Please sign in to comment.