File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,24 @@ distribution:
7171 - https://my-bucket.s3.amazonaws.com
7272` ` `
7373
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+
7492#### Custom cache behavior
7593Custom cache behaviors support the same config parameters as the default cache behavior (see the example above).
7694` ` ` yml
You can’t perform that action at this time.
0 commit comments