mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-24 17:48:30 +02:00
@@ -57,16 +57,17 @@ export const plugin: PluginDefinition = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Support body signing here
|
if (args.method !== 'GET') {
|
||||||
headers['x-amz-content-sha256'] = 'UNSIGNED-PAYLOAD';
|
headers['x-amz-content-sha256'] = 'UNSIGNED-PAYLOAD';
|
||||||
|
}
|
||||||
|
|
||||||
const signature = aws4.sign(
|
const signature = aws4.sign(
|
||||||
{
|
{
|
||||||
host: url.host,
|
host: url.host,
|
||||||
method: args.method,
|
method: args.method,
|
||||||
path: url.pathname + (url.search || '') || undefined,
|
path: url.pathname + (url.search || ''),
|
||||||
service: String(values.service || 'sts') || undefined,
|
service: String(values.service || 'sts'),
|
||||||
region: String(values.region || 'us-east-1') || undefined,
|
region: values.region ? String(values.region) : undefined,
|
||||||
headers,
|
headers,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -81,8 +82,6 @@ export const plugin: PluginDefinition = {
|
|||||||
// - opts.headers["X-Amz-Date"]
|
// - opts.headers["X-Amz-Date"]
|
||||||
// - optionally content sha256 header etc
|
// - optionally content sha256 header etc
|
||||||
|
|
||||||
console.log('ADDING STUFF', signature);
|
|
||||||
|
|
||||||
if (signature.headers == null) {
|
if (signature.headers == null) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user