Skip to content

Commit

Permalink
Change check for HeaderHash
Browse files Browse the repository at this point in the history
  • Loading branch information
cyu committed Mar 16, 2023
1 parent bd99f4c commit ced325a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/rack/cors/resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ 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)
# 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
end

protected
Expand Down

0 comments on commit ced325a

Please sign in to comment.