From 64581e0fda040ad179d7f41c98f984bda61875d4 Mon Sep 17 00:00:00 2001 From: Christian Sutter Date: Wed, 20 Nov 2024 15:50:13 +0000 Subject: [PATCH] Add `host_authorization` setting for dev environment Sinatra 4.1 ships with a breaking change that [enables host allowlisting middleware][1] in local development, which in turn breaks running Search API through GOV.UK Docker. This adds an explicit `permitted_hosts` setting for the middleware in the development environment, which allows access with arbitrary host headers. [1]: https://github.com/sinatra/sinatra/pull/2053 --- lib/rummager/config.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/rummager/config.rb b/lib/rummager/config.rb index a19090190..4cab2a128 100644 --- a/lib/rummager/config.rb +++ b/lib/rummager/config.rb @@ -3,6 +3,7 @@ configure :development do set :protection, false + set :host_authorization, { permitted_hosts: [] } end # Enable custom error handling (eg ``error Exception do;...end``)