lib/stream/signedrequest.rb in stream-ruby-2.5.10 vs lib/stream/signedrequest.rb in stream-ruby-2.6.0
- old
+ new
@@ -16,21 +16,21 @@
def make_signed_request(method, relative_url, params = {}, data = {})
query_params = make_query_params(params)
context = HttpSignatures::Context.new(
keys: {@api_key => @api_secret},
algorithm: 'hmac-sha256',
- headers: %w((request-target) Date)
+ headers: %w(date)
)
method_map = {
:get => Net::HTTP::Get,
:delete => Net::HTTP::Delete,
:put => Net::HTTP::Put,
:post => Net::HTTP::Post
}
request_date = Time.now.rfc822
message = method_map[method].new(
"#{get_http_client.base_path}#{relative_url}?#{URI.encode_www_form(query_params)}",
- 'Date' => request_date
+ 'date' => request_date
)
context.signer.sign(message)
headers = {
Authorization: message['Signature'],
Date: request_date,