diff --git a/README.md b/README.md index a00bf23..2f7a5ed 100644 --- a/README.md +++ b/README.md @@ -71,6 +71,24 @@ distribution: - https://my-bucket.s3.amazonaws.com ``` +#### Custom header on origin +Custom headers supports a key-value object. +```yml +# serverless.yml + +distribution: + component: '@serverless/aws-cloudfront' + inputs: + origins: + - url: https://my-assets.com + pathPatterns: + /static/images: # route any /static/images requests to https://my-assets.com + ttl: 10 + allowedHttpMethods: ['GET', 'HEAD'] # optional + headers: + x-api-key: apikey # Add any custom header to be sent with the request to the origin +``` + #### Custom cache behavior Custom cache behaviors support the same config parameters as the default cache behavior (see the example above). ```yml