Skip to content

Commit

Permalink
Updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
nalejandroveron authored May 3, 2020
1 parent abbe587 commit 58cbc38
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 58cbc38

Please sign in to comment.