From 8e9701c343962b669e12575879861c391744a171 Mon Sep 17 00:00:00 2001 From: Calvin Yu Date: Thu, 16 Mar 2023 11:49:37 +0000 Subject: [PATCH] Cleanup --- lib/rack/cors/resource.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/rack/cors/resource.rb b/lib/rack/cors/resource.rb index 4cf7303..aa6ae35 100644 --- a/lib/rack/cors/resource.rb +++ b/lib/rack/cors/resource.rb @@ -66,8 +66,7 @@ def to_headers(env) 'access-control-max-age' => max_age.to_s } h['access-control-allow-credentials'] = 'true' if credentials - # Gem.loaded_specs['rack'].version >= Gem::Version.new('3') ? h : Rack::Utils::HeaderHash.new(h) - (defined? Rack::Utils::HeaderHash) ? Rack::Utils::HeaderHash.new(h) : h + defined?(Rack::Utils::HeaderHash) ? Rack::Utils::HeaderHash.new(h) : h end protected