Skip to content
This repository has been archived by the owner on Oct 3, 2024. It is now read-only.

Commit

Permalink
resolves grafana#96
Browse files Browse the repository at this point in the history
  • Loading branch information
rgrygorovych committed Mar 27, 2024
1 parent 358d316 commit a09683f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/internal/signature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,10 @@ export class SignatureV4 {
// Standard headers like content-type are optional.
// For HTTP/2 requests, you must include the :authority header instead of
// the host header. Different services might require other headers."
request.headers[constants.HOST_HEADER] = request.endpoint.hostname
if (!request.headers[constants.HOST_HEADER]) {
request.headers[constants.HOST_HEADER] = request.endpoint.hostname
}


// Filter out headers that will be generated and managed by the signing process.
// If the user provide any of those as part of the HTTPRequest's headers, they
Expand Down Expand Up @@ -214,7 +217,9 @@ export class SignatureV4 {
// Standard headers like content-type are optional.
// For HTTP/2 requests, you must include the :authority header instead of
// the host header. Different services might require other headers."
request.headers[constants.HOST_HEADER] = originalRequest.endpoint.hostname
if (!request.headers[constants.HOST_HEADER]) {
request.headers[constants.HOST_HEADER] = originalRequest.endpoint.hostname
}

// If the user provided a session token, include it in the signed url query string.
if (this.credentials.sessionToken) {
Expand Down

0 comments on commit a09683f

Please sign in to comment.