We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent abbe587 commit 58cbc38Copy full SHA for 58cbc38
README.md
@@ -71,6 +71,24 @@ distribution:
71
- https://my-bucket.s3.amazonaws.com
72
```
73
74
+#### Custom header on origin
75
+Custom headers supports a key-value object.
76
+```yml
77
+# serverless.yml
78
+
79
+distribution:
80
+ component: '@serverless/aws-cloudfront'
81
+ inputs:
82
+ origins:
83
+ - url: https://my-assets.com
84
+ pathPatterns:
85
+ /static/images: # route any /static/images requests to https://my-assets.com
86
+ ttl: 10
87
+ allowedHttpMethods: ['GET', 'HEAD'] # optional
88
+ headers:
89
+ x-api-key: apikey # Add any custom header to be sent with the request to the origin
90
+```
91
92
#### Custom cache behavior
93
Custom cache behaviors support the same config parameters as the default cache behavior (see the example above).
94
```yml
0 commit comments