Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
cyu committed Mar 16, 2023
1 parent ced325a commit 8e9701c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/rack/cors/resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8e9701c

Please sign in to comment.