add additional request id for CloudFront

This commit is contained in:
Emil Lerch 2022-05-28 18:01:49 -07:00
parent 803581f647
commit 46e3a4de11
Signed by: lobo
GPG Key ID: A7B62D657EF764F8

View File

@ -399,10 +399,13 @@ pub fn Request(comptime action: anytype) type {
// so we'll use that // so we'll use that
var host_id: ?[]const u8 = null; var host_id: ?[]const u8 = null;
for (result.headers) |header| { for (result.headers) |header| {
if (std.ascii.eqlIgnoreCase(header.name, "x-amz-request-id")) { if (std.ascii.eqlIgnoreCase(header.name, "x-amzn-requestid")) { // CloudFront
rid = header.value; rid = header.value;
} }
if (std.ascii.eqlIgnoreCase(header.name, "x-amz-id-2")) { if (std.ascii.eqlIgnoreCase(header.name, "x-amz-request-id")) { // S3
rid = header.value;
}
if (std.ascii.eqlIgnoreCase(header.name, "x-amz-id-2")) { // S3
host_id = header.value; host_id = header.value;
} }
} }