mirror of https://github.com/Chocobozzz/PeerTube
Fix invalid http signature
Date header could be inconsistent with the date included in the signaturepull/5138/head
parent
4fdc735020
commit
319f9670bf
|
@ -85,11 +85,14 @@ const peertubeGot = got.extend({
|
||||||
}
|
}
|
||||||
|
|
||||||
httpSignature.signRequest({
|
httpSignature.signRequest({
|
||||||
getHeader: function (header) {
|
getHeader: function (header: string) {
|
||||||
return options.headers[header]
|
const value = options.headers[header.toLowerCase()]
|
||||||
|
|
||||||
|
if (!value) logger.warn('Unknown header requested by http-signature.', { headers: options.headers, header })
|
||||||
|
return value
|
||||||
},
|
},
|
||||||
|
|
||||||
setHeader: function (header, value) {
|
setHeader: function (header: string, value: string) {
|
||||||
options.headers[header] = value
|
options.headers[header] = value
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue