lib/salestation/web/extractors.rb in salestation-0.9.0 vs lib/salestation/web/extractors.rb in salestation-0.10.0
- old
+ new
@@ -48,9 +48,11 @@
def self.[](headers)
InputExtractor.new do |rack_request|
input = headers.map do |header, key|
value = rack_request.env["HTTP_#{header.upcase.tr('-', '_')}"]
+ value ||= rack_request.env["#{header.upcase.tr('-', '_')}"]
+
next if value.nil?
[key, value]
end.compact.to_h
Result::Success(input)