Example code for CloudFront Functions
To help you get started writing function code for CloudFront Functions, see the following
examples. You can also find these examples in the amazon-cloudfront-functions repository
Topics
- Add a Cache-Control header to the response
- Add a cross-origin resource sharing (CORS) header to the response
- Add cross-origin resource sharing (CORS) header to the request
- Add security headers to the response
- Add a True-Client-IP header to the request
- Redirect the viewer to a new URL
- Add index.html to request URLs without a file name
- Validate a simple token in the request
- Use async and await
- Normalize query string parameters
- Use key-value pairs in a function