Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit cdaa79f

Browse files
author
bweigel
committed
adds cloudfront request and response events
(cherry picked from commit fa76a20)
1 parent ac95e0b commit cdaa79f

File tree

2 files changed

+122
-0
lines changed

2 files changed

+122
-0
lines changed
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{
2+
"Records": [
3+
{
4+
"cf": {
5+
"config": {
6+
"distributionId": "EDFDVBD6EXAMPLE",
7+
"requestId": "MRVMF7KydIvxMWfJIglgwHQwZsbG2IhRJ07sn9AkKUFSHS9EXAMPLE=="
8+
},
9+
"request": {
10+
"clientIp": "2001:0db8:85a3:0:0:8a2e:0370:7334",
11+
"querystring": "size=large",
12+
"uri": "/picture.jpg",
13+
"method": "GET",
14+
"headers": {
15+
"host": [
16+
{
17+
"key": "Host",
18+
"value": "d111111abcdef8.cloudfront.net"
19+
}
20+
],
21+
"user-agent": [
22+
{
23+
"key": "User-Agent",
24+
"value": "curl/7.51.0"
25+
}
26+
]
27+
},
28+
"origin": {
29+
"custom": {
30+
"customHeaders": {
31+
"my-origin-custom-header": [
32+
{
33+
"key": "My-Origin-Custom-Header",
34+
"value": "Test"
35+
}
36+
]
37+
},
38+
"domainName": "example.com",
39+
"keepaliveTimeout": 5,
40+
"path": "/custom_path",
41+
"port": 443,
42+
"protocol": "https",
43+
"readTimeout": 5,
44+
"sslProtocols": [
45+
"TLSv1",
46+
"TLSv1.1"
47+
]
48+
},
49+
"s3": {
50+
"authMethod": "origin-access-identity",
51+
"customHeaders": {
52+
"my-origin-custom-header": [
53+
{
54+
"key": "My-Origin-Custom-Header",
55+
"value": "Test"
56+
}
57+
]
58+
},
59+
"domainName": "my-bucket.s3.amazonaws.com",
60+
"path": "/s3_path",
61+
"region": "us-east-1"
62+
}
63+
}
64+
}
65+
}
66+
}
67+
]
68+
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"Records": [
3+
{
4+
"cf": {
5+
"config": {
6+
"distributionId": "EDFDVBD6EXAMPLE",
7+
"requestId": "xGN7KWpVEmB9Dp7ctcVFQC4E-nrcOcEKS3QyAez--06dV7TEXAMPLE=="
8+
},
9+
"request": {
10+
"clientIp": "2001:0db8:85a3:0:0:8a2e:0370:7334",
11+
"method": "GET",
12+
"uri": "/picture.jpg",
13+
"querystring": "size=large",
14+
"headers": {
15+
"host": [
16+
{
17+
"key": "Host",
18+
"value": "d111111abcdef8.cloudfront.net"
19+
}
20+
],
21+
"user-agent": [
22+
{
23+
"key": "User-Agent",
24+
"value": "curl/7.18.1"
25+
}
26+
]
27+
}
28+
},
29+
"response": {
30+
"status": "200",
31+
"statusDescription": "OK",
32+
"headers": {
33+
"server": [
34+
{
35+
"key": "Server",
36+
"value": "MyCustomOrigin"
37+
}
38+
],
39+
"set-cookie": [
40+
{
41+
"key": "Set-Cookie",
42+
"value": "theme=light"
43+
},
44+
{
45+
"key": "Set-Cookie",
46+
"value": "sessionToken=abc123; Expires=Wed, 09 Jun 2021 10:18:14 GMT"
47+
}
48+
]
49+
}
50+
}
51+
}
52+
}
53+
]
54+
}

0 commit comments

Comments
 (0)