diff options
-rw-r--r-- | server/helpers/requests.ts | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/server/helpers/requests.ts b/server/helpers/requests.ts index 495e83558..0756beb16 100644 --- a/server/helpers/requests.ts +++ b/server/helpers/requests.ts | |||
@@ -85,11 +85,14 @@ const peertubeGot = got.extend({ | |||
85 | } | 85 | } |
86 | 86 | ||
87 | httpSignature.signRequest({ | 87 | httpSignature.signRequest({ |
88 | getHeader: function (header) { | 88 | getHeader: function (header: string) { |
89 | return options.headers[header] | 89 | const value = options.headers[header.toLowerCase()] |
90 | |||
91 | if (!value) logger.warn('Unknown header requested by http-signature.', { headers: options.headers, header }) | ||
92 | return value | ||
90 | }, | 93 | }, |
91 | 94 | ||
92 | setHeader: function (header, value) { | 95 | setHeader: function (header: string, value: string) { |
93 | options.headers[header] = value | 96 | options.headers[header] = value |
94 | }, | 97 | }, |
95 | 98 | ||