@@ -7,6 +7,7 @@ import type {
77 CloudFrontRequestHandler ,
88 CloudFrontRequestResult ,
99 CloudFrontResponseEvent ,
10+ CloudFrontResponseEventRecord ,
1011 CloudFrontResponseHandler ,
1112 CloudFrontResponseResult ,
1213 CloudFrontS3Origin ,
@@ -554,6 +555,133 @@ const originResponseEvent: CloudFrontResponseEvent = {
554555 ] ,
555556} ;
556557
558+ const originResponseEventRecord : CloudFrontResponseEventRecord = {
559+ cf : {
560+ config : {
561+ distributionDomainName : "d111111abcdef8.cloudfront.net" ,
562+ distributionId : "EDFDVBD6EXAMPLE" ,
563+ eventType : "origin-response" ,
564+ requestId : "4TyzHTaYWb1GX1qTfsHhEqV6HUDd_BzoBZnwfnvQc_1oF26ClkoUSEQ==" ,
565+ } ,
566+ request : {
567+ clientIp : "203.0.113.178" ,
568+ headers : {
569+ "x-forwarded-for" : [
570+ {
571+ key : "X-Forwarded-For" ,
572+ value : "203.0.113.178" ,
573+ } ,
574+ ] ,
575+ "user-agent" : [
576+ {
577+ key : "User-Agent" ,
578+ value : "Amazon CloudFront" ,
579+ } ,
580+ ] ,
581+ via : [
582+ {
583+ key : "Via" ,
584+ value : "2.0 8f22423015641505b8c857a37450d6c0.cloudfront.net (CloudFront)" ,
585+ } ,
586+ ] ,
587+ host : [
588+ {
589+ key : "Host" ,
590+ value : "example.org" ,
591+ } ,
592+ ] ,
593+ "cache-control" : [
594+ {
595+ key : "Cache-Control" ,
596+ value : "no-cache, cf-no-cache" ,
597+ } ,
598+ ] ,
599+ } ,
600+ method : "GET" ,
601+ origin : {
602+ custom : {
603+ customHeaders : { } ,
604+ domainName : "example.org" ,
605+ keepaliveTimeout : 5 ,
606+ path : "" ,
607+ port : 443 ,
608+ protocol : "https" ,
609+ readTimeout : 30 ,
610+ sslProtocols : [ "TLSv1" , "TLSv1.1" , "TLSv1.2" ] ,
611+ } ,
612+ } ,
613+ querystring : "" ,
614+ uri : "/" ,
615+ } ,
616+ response : {
617+ headers : {
618+ "access-control-allow-credentials" : [
619+ {
620+ key : "Access-Control-Allow-Credentials" ,
621+ value : "true" ,
622+ } ,
623+ ] ,
624+ "access-control-allow-origin" : [
625+ {
626+ key : "Access-Control-Allow-Origin" ,
627+ value : "*" ,
628+ } ,
629+ ] ,
630+ date : [
631+ {
632+ key : "Date" ,
633+ value : "Mon, 13 Jan 2020 20:12:38 GMT" ,
634+ } ,
635+ ] ,
636+ "referrer-policy" : [
637+ {
638+ key : "Referrer-Policy" ,
639+ value : "no-referrer-when-downgrade" ,
640+ } ,
641+ ] ,
642+ server : [
643+ {
644+ key : "Server" ,
645+ value : "ExampleCustomOriginServer" ,
646+ } ,
647+ ] ,
648+ "x-content-type-options" : [
649+ {
650+ key : "X-Content-Type-Options" ,
651+ value : "nosniff" ,
652+ } ,
653+ ] ,
654+ "x-frame-options" : [
655+ {
656+ key : "X-Frame-Options" ,
657+ value : "DENY" ,
658+ } ,
659+ ] ,
660+ "x-xss-protection" : [
661+ {
662+ key : "X-XSS-Protection" ,
663+ value : "1; mode=block" ,
664+ } ,
665+ ] ,
666+ "content-type" : [
667+ {
668+ key : "Content-Type" ,
669+ value : "text/html; charset=utf-8" ,
670+ } ,
671+ ] ,
672+ "content-length" : [
673+ {
674+ key : "Content-Length" ,
675+ value : "9593" ,
676+ } ,
677+ ] ,
678+ } ,
679+ status : "200" ,
680+ statusDescription : "OK" ,
681+ } ,
682+ } ,
683+ } ;
684+
557685const cloudFrontFunctionsEvent : CloudFrontFunctionsEvent = {
558686 version : "1.0" ,
559687 context : {
0 commit comments