From 39827eb0e5a958db52078121ccad3e0de9da8d29 Mon Sep 17 00:00:00 2001 From: Chris Ashton Date: Fri, 18 Oct 2024 12:13:01 +0100 Subject: [PATCH] Safely match `gov.uk` at end of regex Co-authored-by: Bruce Bolt <6329861+brucebolt@users.noreply.github.com> --- config/environments/production.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/environments/production.rb b/config/environments/production.rb index b1e635f03..bb0128347 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -94,7 +94,7 @@ # Enable DNS rebinding protection and other `Host` header attacks. config.hosts = [ - /content-publisher\..*\.gov.uk?/, + /content-publisher\..*\.gov.uk$/, ] # Skip DNS rebinding protection for the default health check endpoint.